mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-22 03:23:05 +00:00
Convert u8 to char (necessary since rand 0.8)
This commit is contained in:
parent
752b035c1a
commit
9f6d5f4380
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ fn main() {
|
|||
let mut vec = vec![String::new(); 100_000];
|
||||
vec.par_iter_mut().for_each(|p| {
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue