1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: avoid using getrandom directly.
getrandom 0.4 annoyingly renamed getrandom::getrandom to getrandom::fill
so we can't easilly support both. On the other hand rand::random is
available in both rand 0.8 and rand 0.10, so use that instead.
Author: Peter Michael Green <plugwash@debian.org>
--- rust-moka-0.12.13.orig/Cargo.toml
+++ rust-moka-0.12.13/Cargo.toml
@@ -162,3 +162,0 @@
-[dev-dependencies.getrandom]
-version = "0.2"
-
--- rust-moka-0.12.13.orig/src/common/frequency_sketch.rs
+++ rust-moka-0.12.13/src/common/frequency_sketch.rs
@@ -211,7 +211,7 @@ mod tests {
static ITEM: Lazy<u32> = Lazy::new(|| {
let mut buf = [0; 4];
- getrandom::getrandom(&mut buf).unwrap();
+ buf = rand::random();
u32::from_ne_bytes(buf)
});
|