Convert u8 to char (necessary since rand 0.8)

This commit is contained in:
Dirkjan Ochtman 2021-03-17 13:12:07 +01:00
parent 752b035c1a
commit 9f6d5f4380

View file

@ -19,7 +19,7 @@ fn main() {
let mut vec = vec![String::new(); 100_000]; let mut vec = vec![String::new(); 100_000];
vec.par_iter_mut().for_each(|p| { vec.par_iter_mut().for_each(|p| {
let mut rng = thread_rng(); let mut rng = thread_rng();
*p = (0..5).map(|_| rng.sample(&Alphanumeric)).collect() *p = (0..5).map(|_| rng.sample(&Alphanumeric) as char).collect()
}); });
vec.par_sort_unstable(); vec.par_sort_unstable();
} }