Skip to content
Merged
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
5 changes: 3 additions & 2 deletions src/uu/split/src/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,9 +1234,10 @@ fn n_chunks_by_line_round_robin(
let mut closed_writers = 0;

let mut i = 0;
let mut line = Vec::new();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please add a bench for the r/N mode in benches/split_bench.rs? otherwise codspeed won't track this gain

loop {
let line = &mut Vec::new();
let num_bytes_read = reader.by_ref().read_until(sep, line)?;
line.clear();
let num_bytes_read = reader.by_ref().read_until(sep, &mut line)?;

// if there is nothing else to read - exit the loop
if num_bytes_read == 0 {
Expand Down
Loading