Update rand and rand_chacha to 0.9 (#15463)

# Description
As description, I think it's worth to move forward to update rand and
rand_chacha to 0.9.

# User-Facing Changes
Hopefully none

# Tests + Formatting
NaN

# After Submitting
NaN
This commit is contained in:
Wind
2025-04-01 20:15:39 +08:00
committed by GitHub
parent 6c0b65b570
commit f39e5b3f37
10 changed files with 37 additions and 44 deletions

View File

@ -1,5 +1,6 @@
use data_encoding::HEXUPPER;
use rand::prelude::*;
use rand::random_range;
use rand_chacha::ChaCha8Rng;
use nu_test_support::nu;
@ -16,7 +17,7 @@ fn random_bytes() -> Vec<String> {
(0..NUM)
.map(|_| {
let length = rng.gen_range(0..512);
let length = random_range(0..512);
let mut bytes = vec![0u8; length];
rng.fill_bytes(&mut bytes);
HEXUPPER.encode(&bytes)