8000 uucore: fix clippy warning from if_not_else lint by cakebaker · Pull Request #5842 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

uucore: fix clippy warning from if_not_else lint #5842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/uucore/src/lib/features/format/num_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
0