mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2026-01-15 09:41:07 +00:00
nl: fix clippy error
This commit is contained in:
parent
3ea18173cb
commit
e45f5404db
1 changed files with 1 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ fn nl<T: Read>(reader: &mut BufReader<T>, settings: &Settings) {
|
|||
let mut line_filter: fn(&str, ®ex::Regex) -> bool = pass_regex;
|
||||
for mut l in reader.lines().map(|r| r.unwrap()) {
|
||||
// Sanitize the string. We want to print the newline ourselves.
|
||||
if l.chars().last() == Some('\n') {
|
||||
if l.ends_with('\n') {
|
||||
l.pop();
|
||||
}
|
||||
// Next we iterate through the individual chars to see if this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue