mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 05:27:45 +00:00
core: fix clippy warning for size parser
This commit is contained in:
parent
f8a46196ef
commit
6233ad6dd7
1 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@ impl<'parser> Parser<'parser> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NumberSystem::Octal => {
|
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) {
|
match u64::from_str_radix(trimmed_string, 8) {
|
||||||
Ok(res) => res,
|
Ok(res) => res,
|
||||||
Err(_) => return Err(ParseSizeError::parse_failure(size)),
|
Err(_) => return Err(ParseSizeError::parse_failure(size)),
|
||||||
|
@ -212,7 +212,7 @@ impl<'parser> Parser<'parser> {
|
||||||
.take_while(|c| c.is_ascii_digit())
|
.take_while(|c| c.is_ascii_digit())
|
||||||
.collect::<String>()
|
.collect::<String>()
|
||||||
.len();
|
.len();
|
||||||
if size.starts_with("0") && num_digits > 1 {
|
if size.starts_with('0') && num_digits > 1 {
|
||||||
return NumberSystem::Octal;
|
return NumberSystem::Octal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue