mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
core: fix clippy warning for size parser
This commit is contained in:
parent
3ca003846d
commit
6cadffc8f1
1 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@ impl<'parser> Parser<'parser> {
|
|||
}
|
||||
}
|
||||
NumberSystem::Octal => {
|
||||
let trimmed_string = numeric_string.trim_start_matches("0");
|
||||
let trimmed_string = numeric_string.trim_start_matches('0');
|
||||
match u64::from_str_radix(trimmed_string, 8) {
|
||||
Ok(res) => res,
|
||||
Err(_) => return Err(ParseSizeError::parse_failure(size)),
|
||||
|
@ -212,7 +212,7 @@ impl<'parser> Parser<'parser> {
|
|||
.take_while(|c| c.is_ascii_digit())
|
||||
.collect::<String>()
|
||||
.len();
|
||||
if size.starts_with("0") && num_digits > 1 {
|
||||
if size.starts_with('0') && num_digits > 1 {
|
||||
return NumberSystem::Octal;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue