From 9d1fe709e90b9124b4cc491cc2e9243287ef0cf2 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Wed, 8 Jul 2026 18:04:30 -0600 Subject: [PATCH] x-wing: remove direct `rand_core` dependency It can be sourced transitively instead --- x-wing/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-wing/src/lib.rs b/x-wing/src/lib.rs index 1620deb..666fccd 100644 --- a/x-wing/src/lib.rs +++ b/x-wing/src/lib.rs @@ -29,6 +29,7 @@ pub use kem::{ self, Decapsulate, Decapsulator, Encapsulate, Generate, InvalidKey, Kem, Key, KeyExport, KeyInit, KeySizeUser, TryKeyInit, + common::rand_core::{CryptoRng, TryCryptoRng}, }; use core::fmt::{self, Debug}; @@ -40,7 +41,6 @@ use ml_kem::{ }, ml_kem_768, }; -use rand_core::{CryptoRng, TryCryptoRng, TryRng}; use sha3::Sha3_256; use shake::{ExtendableOutput, Shake256, Shake256Reader, XofReader}; use x25519_dalek::{PublicKey, StaticSecret}; @@ -239,7 +239,7 @@ impl From<[u8; DECAPSULATION_KEY_SIZE]> for DecapsulationKey { } impl Generate for DecapsulationKey { - fn try_generate_from_rng(rng: &mut R) -> Result::Error> + fn try_generate_from_rng(rng: &mut R) -> Result where R: TryCryptoRng + ?Sized, {