Upgrade rand to 0.9.1

This commit is contained in:
weisd
2025-06-09 10:13:03 +08:00
committed by houseme
parent 3edfdbea76
commit 152ad57c1d
14 changed files with 49 additions and 58 deletions
+2 -2
View File
@@ -77,8 +77,8 @@ impl LRWMutex {
}
let sleep_time: u64;
{
let mut rng = rand::thread_rng();
sleep_time = rng.gen_range(10..=50);
let mut rng = rand::rng();
sleep_time = rng.random_range(10..=50);
}
sleep(Duration::from_millis(sleep_time)).await;
}