Skip to content

Commit 71dc8e5

Browse files
committed
xtask: Fix deprecation warnings with rand 0.9
The rand crate was bumped from 0.8 -> 0.9 in 7804be9 Signed-off-by: John Eckersberg <[email protected]>
1 parent 0e27000 commit 71dc8e5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/xtask/src/xtask.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,11 @@ fn verify_ssh_connectivity(sh: &Shell, port: u16, key_path: &Utf8Path) -> Result
491491

492492
/// Generate a random alphanumeric suffix for VM names
493493
fn generate_random_suffix() -> String {
494-
let mut rng = rand::thread_rng();
494+
let mut rng = rand::rng();
495495
const CHARSET: &[u8] = b"abcdefghijklmnopqrstuvwxyz0123456789";
496496
(0..8)
497497
.map(|_| {
498-
let idx = rng.gen_range(0..CHARSET.len());
498+
let idx = rng.random_range(0..CHARSET.len());
499499
CHARSET[idx] as char
500500
})
501501
.collect()

0 commit comments

Comments
 (0)