1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 20:17:45 +00:00

wc: fix collapsible match clippy warning

This commit is contained in:
Jeffrey Finkelstein 2021-08-21 17:24:10 -04:00
parent 5e07d58a4d
commit ecf59b173d

View file

@ -350,13 +350,8 @@ fn digit_width(input: &Input) -> WcResult<Option<usize>> {
fn max_width(inputs: &[Input]) -> usize { fn max_width(inputs: &[Input]) -> usize {
let mut result = 1; let mut result = 1;
for input in inputs { for input in inputs {
match digit_width(input) { if let Ok(Some(n)) = digit_width(input) {
Ok(maybe_n) => { result = result.max(n);
if let Some(n) = maybe_n {
result = result.max(n);
}
}
Err(_) => continue,
} }
} }
result result