Skip to content

Commit 1e131d1

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 1e131d1

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

rand_core/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
### API changes
99
- Relax `Sized` bound on impls of `TryRngCore`, `TryCryptoRng` and `UnwrapMut` (#1593)
1010

11+
### Other
12+
- Fixup clippy warnings (#1601)
13+
1114
## [0.9.1] - 2025-02-16
1215
### API changes
1316
- Add `TryRngCore::unwrap_mut`, providing an impl of `RngCore` over `&mut rng` (#1589)

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/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## Unreleased
8+
### Other changes
9+
- Fixup clippy warnings (#1601)
10+
711
## [0.9.0] - 2025-01-27
812
### Dependencies and features
913
- Update to `rand_core` v0.9.0 (#1558)

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)