1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Description: add feature constraints to tests
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2023-02-03
---
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(feature = "wyrand")]
#[cfg(test)]
mod tests {
use crate::{Rng, WyRand};
--- a/src/entropy.rs
+++ b/src/entropy.rs
@@ -48,7 +48,7 @@
windows
)))]
pub fn system(out: &mut [u8]) {
- backup_entropy(out);
+ backup(out);
}
#[cfg(feature = "rdseed")]
@@ -124,6 +124,6 @@
#[cfg(not(feature = "std"))]
/// This just panics.
-pub fn backup_entropy(_: &mut [u8]) {
+pub fn backup(_: &mut [u8]) {
panic!("Failed to source any entropy!")
}
|