File: 1001_feature_constraints.patch

package info (click to toggle)
rust-nanorand 0.7.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 380 kB
  • sloc: perl: 258; python: 157; ansic: 97; cpp: 7; makefile: 5; sh: 1
file content (44 lines) | stat: -rw-r--r-- 905 bytes parent folder | download | duplicates (3)
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!")
 }