Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
printfn committed Dec 30, 2024
1 parent bc60e7d commit b838c78
Show file tree
Hide file tree
Showing 7 changed files with 419 additions and 387 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/src/num/biguint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ impl Format for BigUint {
test_int(int)?;
let divmod_res = num.divmod(&divisor, int)?;
let mut digit_group_value =
u128::from(divmod_res.1.get(1)) << 64 | u128::from(divmod_res.1.get(0));
(u128::from(divmod_res.1.get(1)) << 64) | u128::from(divmod_res.1.get(0));
for _ in 0..rounds {
let digit_value = digit_group_value % base_as_u128;
digit_group_value /= base_as_u128;
Expand All @@ -905,7 +905,7 @@ impl Format for BigUint {
}
let exact = params
.sf_limit
.map_or(true, |sf| sf >= output.len() - num_leading_zeroes);
.is_none_or(|sf| sf >= output.len() - num_leading_zeroes);
Exact::new(
FormattedBigUint {
base: base_prefix,
Expand Down
4 changes: 1 addition & 3 deletions core/src/num/unit/named_unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ impl NamedUnit {
self.singular_name
.chars()
.next()
.map_or(true, |first_char| {
char::is_alphabetic(first_char) || first_char == '\u{b0}'
})
.is_none_or(|first_char| char::is_alphabetic(first_char) || first_char == '\u{b0}')
}
}

Expand Down
Loading

0 comments on commit b838c78

Please sign in to comment.