mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 04:57:45 +00:00
comm: clean up line-end check
This commit is contained in:
parent
f104f8868c
commit
6003d95974
1 changed files with 2 additions and 3 deletions
|
@ -50,9 +50,8 @@ fn mkdelim(col: usize, opts: &ArgMatches) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ensure_nl(line: &mut String) {
|
fn ensure_nl(line: &mut String) {
|
||||||
match line.chars().last() {
|
if !line.ends_with('\n') {
|
||||||
Some('\n') => (),
|
line.push('\n');
|
||||||
_ => line.push('\n'),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue