Bump rand crate to 0.9 (#12674)

This commit is contained in:
Folke Behrens
2025-07-22 11:31:39 +02:00
committed by GitHub
parent 5464552020
commit 9c0efba91e
60 changed files with 231 additions and 237 deletions

View File

@@ -5,7 +5,7 @@ use std::time::Duration;
use async_trait::async_trait;
use clashmap::ClashMap;
use clashmap::mapref::one::Ref;
use rand::{Rng, thread_rng};
use rand::Rng;
use tokio::time::Instant;
use tracing::{debug, info};
@@ -343,7 +343,7 @@ impl ProjectInfoCacheImpl {
}
fn gc(&self) {
let shard = thread_rng().gen_range(0..self.project2ep.shards().len());
let shard = rand::rng().random_range(0..self.project2ep.shards().len());
debug!(shard, "project_info_cache: performing epoch reclamation");
// acquire a random shard lock