mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
wc: fix collapsible match clippy warning
This commit is contained in:
+2
-7
@@ -350,13 +350,8 @@ fn digit_width(input: &Input) -> WcResult<Option<usize>> {
|
||||
fn max_width(inputs: &[Input]) -> usize {
|
||||
let mut result = 1;
|
||||
for input in inputs {
|
||||
match digit_width(input) {
|
||||
Ok(maybe_n) => {
|
||||
if let Some(n) = maybe_n {
|
||||
result = result.max(n);
|
||||
}
|
||||
}
|
||||
Err(_) => continue,
|
||||
if let Ok(Some(n)) = digit_width(input) {
|
||||
result = result.max(n);
|
||||
}
|
||||
}
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user