Skip to content

Commit 975f602

Browse files
committed
fixup clippy 1.85 warnings
Rust 1.85 released today and brings new lints: https://rust-lang.github.io/rust-clippy/master/index.html#precedence
1 parent 775b05b commit 975f602

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rand_core/src/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl<R: BlockRngCore<Item = u32>> RngCore for BlockRng<R> {
197197
fn next_u64(&mut self) -> u64 {
198198
let read_u64 = |results: &[u32], index| {
199199
let data = &results[index..=index + 1];
200-
u64::from(data[1]) << 32 | u64::from(data[0])
200+
(u64::from(data[1]) << 32) | u64::from(data[0])
201201
};
202202

203203
let len = self.results.as_ref().len();

rand_pcg/src/pcg128.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl SeedableRng for Mcg128Xsl64 {
234234
// Read as if a little-endian u128 value:
235235
let mut seed_u64 = [0u64; 2];
236236
le::read_u64_into(&seed, &mut seed_u64);
237-
let state = u128::from(seed_u64[0]) | u128::from(seed_u64[1]) << 64;
237+
let state = u128::from(seed_u64[0]) | (u128::from(seed_u64[1]) << 64);
238238
Mcg128Xsl64::new(state)
239239
}
240240
}

0 commit comments

Comments
 (0)