From d96637959967df0e87125cf129ada53e3350804d Mon Sep 17 00:00:00 2001 From: arckoor <33837362+arckoor@users.noreply.github.com> Date: Tue, 21 Jul 2026 18:09:21 +0200 Subject: [PATCH] Upgrade rand dependency to v10 --- botan/Cargo.toml | 4 ++-- botan/src/rng.rs | 4 ++-- botan/tests/tests.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/botan/Cargo.toml b/botan/Cargo.toml index 69fc02d..82c0c7a 100644 --- a/botan/Cargo.toml +++ b/botan/Cargo.toml @@ -15,7 +15,7 @@ rust-version = "1.85" [dependencies] botan-sys = { version = "1.20260506", path = "../botan-sys" } -rand = { version = "0.9.2", default-features = false, optional = true } +rand_core = { version = "0.10", default-features = false, optional = true } [dev-dependencies] wycheproof = { version = "0.6", default-features = false, features = ["aead", "cipher", "dsa", "ecdh", "ecdsa", "eddsa", "hkdf", "keywrap", "mac", "primality", "rsa_enc", "rsa_sig", "xdh"] } @@ -27,7 +27,7 @@ std = [] vendored = ["botan-sys/vendored"] static = ["botan-sys/static"] pkg-config = ["botan-sys/pkg-config"] -rand = ["dep:rand"] +rand = ["dep:rand_core"] [lints.clippy] # introduced because of from_str diff --git a/botan/src/rng.rs b/botan/src/rng.rs index 4109cc0..b98f553 100644 --- a/botan/src/rng.rs +++ b/botan/src/rng.rs @@ -166,7 +166,7 @@ impl RandomNumberGenerator { } #[cfg(feature = "rand")] -impl rand::TryRngCore for RandomNumberGenerator { +impl rand_core::TryRng for RandomNumberGenerator { type Error = Error; fn try_next_u32(&mut self) -> Result { @@ -188,4 +188,4 @@ impl rand::TryRngCore for RandomNumberGenerator { } #[cfg(feature = "rand")] -impl rand::TryCryptoRng for RandomNumberGenerator {} +impl rand_core::TryCryptoRng for RandomNumberGenerator {} diff --git a/botan/tests/tests.rs b/botan/tests/tests.rs index d96e676..2205fb2 100644 --- a/botan/tests/tests.rs +++ b/botan/tests/tests.rs @@ -446,7 +446,7 @@ fn test_rng() -> Result<(), botan::Error> { #[cfg(feature = "rand")] { - use rand::TryRngCore; + use rand_core::TryRng; let read1 = rng.try_next_u32()?; let read2 = rng.try_next_u32()?;