mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 06:45:59 +02:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user