1
Fork 0
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:
Jeong YunWon 2021-06-11 21:59:16 +09:00
parent f104f8868c
commit 6003d95974

View file

@ -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'),
} }
} }