chore: update dependency rand to 0.9

This commit is contained in:
Gwen Lg
2026-01-28 23:47:38 +01:00
committed by Alex
parent be8e4c9dcf
commit 934c4c31f1
9 changed files with 53 additions and 24 deletions
Generated
+45 -16
View File
@@ -558,7 +558,7 @@ checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"
dependencies = [
"getrandom 0.2.17",
"instant",
"rand",
"rand 0.8.5",
]
[[package]]
@@ -921,7 +921,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
dependencies = [
"generic-array",
"rand_core",
"rand_core 0.6.4",
"typenum",
]
@@ -1478,7 +1478,7 @@ dependencies = [
"garage_util",
"hex",
"opentelemetry",
"rand",
"rand 0.9.2",
"serde",
"tokio",
"tokio-util 0.7.18",
@@ -1520,7 +1520,7 @@ dependencies = [
"hex",
"http 1.4.0",
"parse_duration",
"rand",
"rand 0.9.2",
"serde",
"serde_bytes",
"thiserror 2.0.18",
@@ -1545,7 +1545,7 @@ dependencies = [
"opentelemetry-contrib",
"pin-project",
"pretty_env_logger",
"rand",
"rand 0.9.2",
"rmp-serde",
"serde",
"thiserror 2.0.18",
@@ -1575,7 +1575,7 @@ dependencies = [
"nix",
"opentelemetry",
"pnet_datalink",
"rand",
"rand 0.9.2",
"reqwest",
"schemars",
"serde",
@@ -1600,7 +1600,7 @@ dependencies = [
"hex",
"hexdump",
"opentelemetry",
"rand",
"rand 0.9.2",
"serde",
"serde_bytes",
"tokio",
@@ -1626,7 +1626,7 @@ dependencies = [
"lazy_static",
"mktemp",
"opentelemetry",
"rand",
"rand 0.9.2",
"rmp-serde",
"rustc_version",
"serde",
@@ -2957,7 +2957,7 @@ dependencies = [
"lazy_static",
"percent-encoding",
"pin-project",
"rand",
"rand 0.8.5",
"thiserror 1.0.69",
"tokio",
"tokio-stream",
@@ -3068,7 +3068,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166"
dependencies = [
"base64ct",
"rand_core",
"rand_core 0.6.4",
"subtle",
]
@@ -3182,7 +3182,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
dependencies = [
"phf_shared",
"rand",
"rand 0.8.5",
]
[[package]]
@@ -3494,8 +3494,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
]
[[package]]
name = "rand"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
dependencies = [
"rand_chacha 0.9.0",
"rand_core 0.9.5",
]
[[package]]
@@ -3505,7 +3515,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
"rand_core 0.6.4",
]
[[package]]
name = "rand_chacha"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
dependencies = [
"ppv-lite86",
"rand_core 0.9.5",
]
[[package]]
@@ -3517,6 +3537,15 @@ dependencies = [
"getrandom 0.2.17",
]
[[package]]
name = "rand_core"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
dependencies = [
"getrandom 0.3.4",
]
[[package]]
name = "redox_syscall"
version = "0.5.18"
@@ -4643,7 +4672,7 @@ dependencies = [
"indexmap 1.9.3",
"pin-project",
"pin-project-lite",
"rand",
"rand 0.8.5",
"slab",
"tokio",
"tokio-util 0.7.18",
@@ -4880,7 +4909,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d"
dependencies = [
"getrandom 0.2.17",
"rand",
"rand 0.8.5",
]
[[package]]
+1 -1
View File
@@ -68,7 +68,7 @@ parse_duration = "2.1"
paste = "1.0"
pin-project = "1.0.12"
pnet_datalink = "0.34"
rand = "0.8"
rand = "0.9"
sha1 = "0.10"
sha2 = "0.10"
timeago = { version = "0.4", default-features = false }
+1 -1
View File
@@ -780,7 +780,7 @@ impl BlockManagerLocked {
assert!(to_delete.as_ref() != Some(&tgt_path));
let mut path_tmp = tgt_path.clone();
let tmp_extension = format!("tmp{}", hex::encode(thread_rng().gen::<[u8; 4]>()));
let tmp_extension = format!("tmp{}", hex::encode(rand::rng().random::<[u8; 4]>()));
path_tmp.set_extension(tmp_extension);
fs::create_dir_all(&directory).await?;
+1 -1
View File
@@ -248,7 +248,7 @@ fn randomize_next_scrub_run_time(timestamp: u64) -> u64 {
timestamp
+ SCRUB_INTERVAL
.saturating_add(Duration::from_secs(
rand::thread_rng().gen_range(0..3600 * 24 * 10),
rand::rng().random_range(0..3600 * 24 * 10),
))
.as_millis() as u64
}
+1 -1
View File
@@ -130,7 +130,7 @@ impl Worker for AutoSnapshotWorker {
async_snapshot_metadata(&self.garage).await?;
let rand_factor = 1f32 + thread_rng().gen::<f32>() / 5f32;
let rand_factor = 1f32 + rand::rng().random::<f32>() / 5f32;
self.next_snapshot = Instant::now() + self.snapshot_interval.mul_f32(rand_factor);
Ok(WorkerState::Idle)
+1 -1
View File
@@ -78,7 +78,7 @@ impl OrderTag {
/// let tag_2 = stream.order(2);
/// ```
pub fn stream() -> OrderTagStream {
OrderTagStream(thread_rng().gen())
OrderTagStream(rand::rng().random())
}
}
impl OrderTagStream {
+1 -1
View File
@@ -510,7 +510,7 @@ impl<F: TableSchema, R: TableReplication> SyncWorker<F, R> {
partitions.layout_version
);
partitions.partitions.shuffle(&mut thread_rng());
partitions.partitions.shuffle(&mut rand::rng());
self.todo = Some(partitions);
}
Err(e) => {
+1 -1
View File
@@ -151,7 +151,7 @@ pub fn fasthash(data: &[u8]) -> FastHash {
/// Generate a random 32 bytes UUID
pub fn gen_uuid() -> Uuid {
rand::thread_rng().gen::<[u8; 32]>().into()
rand::rng().random::<[u8; 32]>().into()
}
#[cfg(test)]
+1 -1
View File
@@ -59,5 +59,5 @@ where
// ----
pub fn gen_trace_id() -> TraceId {
rand::thread_rng().gen::<[u8; 16]>().into()
rand::rng().random::<[u8; 16]>().into()
}