tests: update random_chars generator to map u8 to char

Fix 'value of type `char` cannot be built from `std::iter::Iterator<Item=u8>`' for split test.

refs: https://docs.rs/rand/0.8.4/rand/distributions/struct.Alphanumeric.html#example
This commit is contained in:
Greg Guthe
2022-01-24 20:40:31 -05:00
parent cae6bc5e82
commit 771c9f5d9c
+1
View File
@@ -22,6 +22,7 @@ use std::{
fn random_chars(n: usize) -> String {
thread_rng()
.sample_iter(&rand::distributions::Alphanumeric)
.map(char::from)
.take(n)
.collect::<String>()
}