mirror of
https://github.com/uutils/coreutils
synced 2024-12-17 16:43:16 +00:00
refactor/polish ~ fix cargo clippy
complaints (wildcard_in_or_patt)
This commit is contained in:
parent
5224c3cd49
commit
0cf704a1bf
4 changed files with 6 additions and 5 deletions
|
@ -623,7 +623,7 @@ fn display_file_name(
|
|||
Some(val) => match val.as_ref() {
|
||||
"always" | "yes" | "force" => true,
|
||||
"auto" | "tty" | "if-tty" => stdout_isatty(),
|
||||
"never" | "no" | "none" | _ => false,
|
||||
/* "never" | "no" | "none" | */ _ => false,
|
||||
},
|
||||
};
|
||||
let classify = options.opt_present("classify");
|
||||
|
|
|
@ -128,7 +128,7 @@ impl Intf {
|
|||
},
|
||||
'x' | 'X' => "ffffffffffffffff",
|
||||
'o' => "1777777777777777777777",
|
||||
'u' | _ => "18446744073709551615",
|
||||
/* 'u' | */ _ => "18446744073709551615",
|
||||
}));
|
||||
fmt_prim
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ impl Formatter for Intf {
|
|||
let radix_out = match *field.field_char {
|
||||
'd' | 'i' | 'u' => Base::Ten,
|
||||
'x' | 'X' => Base::Hex,
|
||||
'o' | _ => Base::Octal,
|
||||
/* 'o' | */ _ => Base::Octal,
|
||||
};
|
||||
let radix_mismatch = !radix_out.eq(&inprefix.radix_in);
|
||||
let decr_from_max: bool = inprefix.sign == -1 && *field.field_char != 'i';
|
||||
|
|
|
@ -369,7 +369,8 @@ impl token::Token for Sub {
|
|||
// for 'c': get iter of string vals,
|
||||
// get opt<char> of first val
|
||||
// and map it to opt<String>
|
||||
'c' | _ => arg_string.chars().next().map(|x| x.to_string()),
|
||||
/* 'c' | */
|
||||
_ => arg_string.chars().next().map(|x| x.to_string()),
|
||||
}
|
||||
}
|
||||
None => None,
|
||||
|
|
|
@ -148,7 +148,7 @@ impl UnescapedText {
|
|||
'u' | 'U' => {
|
||||
let len = match e {
|
||||
'u' => 4,
|
||||
'U' | _ => 8,
|
||||
/* 'U' | */ _ => 8,
|
||||
};
|
||||
let val = UnescapedText::base_to_u32(len, len, 16, it);
|
||||
UnescapedText::validate_iec(val, false);
|
||||
|
|
Loading…
Reference in a new issue