Update Rust crate rand to 0.9.0 #287

Merged
pierre merged 2 commits from renovate/rand-0.x into master 2025-02-03 20:10:57 +00:00
Showing only changes of commit 70ca59d96f - Show all commits

View File

@ -1,12 +1,6 @@
use rand::distributions::Alphanumeric;
use rand::Rng;
use rand::distr::{Alphanumeric, SampleString};
/// Generate a random string
pub fn rand_str(len: usize) -> String {
let s: String = rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(len)
.map(char::from)
.collect();
s
Alphanumeric.sample_string(&mut rand::rng(), len)
}