Skip to content

Commit

Permalink
zfs-core: fix for new rand version
Browse files Browse the repository at this point in the history
  • Loading branch information
codyps committed Oct 22, 2021
1 parent b53dc1b commit 34244e1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zfs-core/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ impl TempFs {
let z = zfs::Zfs::new()?;
let nv = nvpair::NvList::try_new()?;

let rng = thread_rng();
let mut rng = thread_rng();
for _ in 0..NUM_RETRIES {
let suffix: String = rng.sample_iter(Alphanumeric).take(NUM_RAND_CHARS).collect();
let suffix: String = (&mut rng)
.sample_iter(Alphanumeric)
.take(NUM_RAND_CHARS)
.map(|x| x as char)
.collect();

let mut path = base.to_owned();
path.push_str("/");
Expand Down

0 comments on commit 34244e1

Please sign in to comment.