Skip to content

Commit b838c78

Browse files
committed
Clippy fixes
1 parent bc60e7d commit b838c78

File tree

7 files changed

+419
-387
lines changed

7 files changed

+419
-387
lines changed

Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/num/biguint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ impl Format for BigUint {
882882
test_int(int)?;
883883
let divmod_res = num.divmod(&divisor, int)?;
884884
let mut digit_group_value =
885-
u128::from(divmod_res.1.get(1)) << 64 | u128::from(divmod_res.1.get(0));
885+
(u128::from(divmod_res.1.get(1)) << 64) | u128::from(divmod_res.1.get(0));
886886
for _ in 0..rounds {
887887
let digit_value = digit_group_value % base_as_u128;
888888
digit_group_value /= base_as_u128;
@@ -905,7 +905,7 @@ impl Format for BigUint {
905905
}
906906
let exact = params
907907
.sf_limit
908-
.map_or(true, |sf| sf >= output.len() - num_leading_zeroes);
908+
.is_none_or(|sf| sf >= output.len() - num_leading_zeroes);
909909
Exact::new(
910910
FormattedBigUint {
911911
base: base_prefix,

core/src/num/unit/named_unit.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ impl NamedUnit {
163163
self.singular_name
164164
.chars()
165165
.next()
166-
.map_or(true, |first_char| {
167-
char::is_alphabetic(first_char) || first_char == '\u{b0}'
168-
})
166+
.is_none_or(|first_char| char::is_alphabetic(first_char) || first_char == '\u{b0}')
169167
}
170168
}
171169

0 commit comments

Comments
 (0)