refactor/polish ~ fix cargo clippy complaints (wildcard_in_or_patt)

This commit is contained in:
Roy Ivy III 2020-04-03 16:45:10 -05:00
parent 5224c3cd49
commit 0cf704a1bf
4 changed files with 6 additions and 5 deletions

View file

@ -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");

View file

@ -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';

View file

@ -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,

View file

@ -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);