diff --git a/curve25519-dalek/src/edwards.rs b/curve25519-dalek/src/edwards.rs index 5bd81141..c49590b3 100644 --- a/curve25519-dalek/src/edwards.rs +++ b/curve25519-dalek/src/edwards.rs @@ -112,7 +112,7 @@ use { subtle::CtOption, }; -#[cfg(any(test, feature = "group"))] +#[cfg(feature = "group")] use rand_core::RngCore; use subtle::Choice; @@ -1593,6 +1593,10 @@ impl CofactorGroup for EdwardsPoint { mod test { use super::*; + // If `group` is set, then this is already imported in super + #[cfg(not(feature = "group"))] + use rand_core::RngCore; + #[cfg(feature = "alloc")] use alloc::vec::Vec;