mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 04:27:45 +00:00
Merge pull request #6764 from cakebaker/cat_remove_duplicate_code
cat: use `write_end_of_line()` to avoid duplicate code
This commit is contained in:
commit
5ae8316ace
1 changed files with 1 additions and 4 deletions
|
@ -557,10 +557,7 @@ fn write_new_line<W: Write>(
|
||||||
write!(writer, "{0:6}\t", state.line_number)?;
|
write!(writer, "{0:6}\t", state.line_number)?;
|
||||||
state.line_number += 1;
|
state.line_number += 1;
|
||||||
}
|
}
|
||||||
writer.write_all(options.end_of_line().as_bytes())?;
|
write_end_of_line(writer, options.end_of_line().as_bytes(), is_interactive)?;
|
||||||
if is_interactive {
|
|
||||||
writer.flush()?;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue