Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/uu/sort/src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use crate::{
GlobalSettings, SortError,
chunks::{self, Chunk, RecycledChunk},
chunks::{self, Chunk, ReadStatus, RecycledChunk},
compare_by, open,
};
use itertools::Itertools;
Expand Down Expand Up @@ -168,7 +168,7 @@ pub fn check(path: &OsStr, settings: &GlobalSettings) -> UResult<()> {
let mut line_idx = 0;
loop {
let recycled = RecycledChunk::new(buffer_size(settings));
let should_continue = chunks::read(
let status = chunks::read(
&sender,
recycled,
None,
Expand All @@ -189,7 +189,7 @@ pub fn check(path: &OsStr, settings: &GlobalSettings) -> UResult<()> {
)?;
prev_chunk = Some(chunk);
}
if !should_continue {
if status == ReadStatus::End {
break;
}
}
Expand All @@ -206,7 +206,7 @@ fn reader(
) -> UResult<()> {
let mut carry_over = vec![];
for recycled_chunk in receiver {
let should_continue = chunks::read(
let status = chunks::read(
sender,
recycled_chunk,
None,
Expand All @@ -216,7 +216,7 @@ fn reader(
settings.line_ending.into(),
settings,
)?;
if !should_continue {
if status == ReadStatus::End {
break;
}
}
Expand Down
Loading
Loading