1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

uucore: fix clippy warning from if_not_else lint

This commit is contained in:
Daniel Hofstetter 2024-01-15 10:27:59 +01:00
parent 6d5f2e4129
commit e91540fc07

View file

@ -146,10 +146,10 @@ impl Formatter for UnsignedInt {
// We also need to take into account that 0 should not be 00
// Since this is an unsigned int, we do not need to take the minus
// sign into account.
if x != 0 {
format!("0{x:o}")
} else {
if x == 0 {
format!("{x:o}")
} else {
format!("0{x:o}")
}
}
UnsignedIntVariant::Hexadecimal(Case::Lowercase, Prefix::No) => {