Skip to content

Commit 680b428

Browse files
Update Rust crate rand to 0.9.0 (#83)
* Update Rust crate rand to 0.9.0 * move off deprecated functions --------- Co-authored-by: oxide-renovate[bot] <146848827+oxide-renovate[bot]@users.noreply.github.com> Co-authored-by: Ryan Goodfellow <[email protected]>
1 parent 5b061a6 commit 680b428

File tree

3 files changed

+13
-30
lines changed

3 files changed

+13
-30
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pnet = "0.31"
3131
prettyplease = "0.2"
3232
proc-macro2 = "1.0"
3333
quote = "1.0"
34-
rand = "0.8.5"
34+
rand = "0.9.0"
3535
regex = "1"
3636
serde = "1.0"
3737
serde_tokenstream = "0.2"

test/src/softnpu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ impl<const R: usize, const N: usize, const F: usize> OuterPhy<R, N, F> {
403403
rx_p: RingProducer<R, N, F>,
404404
tx_c: RingConsumer<R, N, F>,
405405
) -> Self {
406-
let mut rng = rand::thread_rng();
407-
let m = rng.gen_range::<u32, _>(0xf00000..0xffffff).to_le_bytes();
406+
let mut rng = rand::rng();
407+
let m = rng.random_range::<u32, _>(0xf00000..0xffffff).to_le_bytes();
408408
let mac = [0xa8, 0x40, 0x25, m[0], m[1], m[2]];
409409

410410
Self {

0 commit comments

Comments
 (0)