Description: fence tests by needed features Author: Jonas Smedegaard Last-Update: 2026-03-10 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/crypto/chacha.rs +++ b/src/crypto/chacha.rs @@ -87,6 +87,7 @@ } } +#[cfg(feature = "std")] #[cfg(test)] mod tests { use super::*; --- a/src/gen.rs +++ b/src/gen.rs @@ -117,6 +117,7 @@ #[cfg(target_pointer_width = "64")] range!((usize, u128, isize)); +#[cfg(all(feature = "wyrand", any(feature = "entropy", feature = "getrandom")))] #[cfg(test)] mod tests { use crate::{Rng, WyRand}; --- a/src/rand/chacha.rs +++ b/src/rand/chacha.rs @@ -59,6 +59,7 @@ } } +#[cfg(any(feature = "entropy", feature = "getrandom"))] impl Rng<64> for ChaCha { fn rand(&mut self) -> [u8; 64] { let block = chacha::chacha_block::(self.state); @@ -94,6 +95,7 @@ } } +#[cfg(any(feature = "entropy", feature = "getrandom"))] impl SeedableRng<40, 64> for ChaCha { fn reseed(&mut self, seed: [u8; 40]) { let mut key = [0_u8; 32];