1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

mktemp: adapt to API change of rand

This commit is contained in:
Daniel Hofstetter 2025-01-29 15:10:23 +01:00
parent ddb027231f
commit 7cff766bdc

View file

@ -429,7 +429,7 @@ fn dry_exec(tmpdir: &Path, prefix: &str, rand: usize, suffix: &str) -> UResult<P
// Randomize.
let bytes = &mut buf[prefix.len()..prefix.len() + rand];
rand::thread_rng().fill(bytes);
rand::rng().fill(bytes);
for byte in bytes {
*byte = match *byte % 62 {
v @ 0..=9 => v + b'0',