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 45 46 47 48 49
|
diff --git a/Cargo.toml b/Cargo.toml
index 1ada37a..1c4b767 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -220,11 +220,11 @@ optional = true
default-features = false
[target.'cfg(not(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))))'.dependencies.getrandom]
-version = "0.3"
+version = "0.2"
optional = true
[target.'cfg(not(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))))'.dependencies.rand]
-version = "0.9"
+version = ">= 0.8, < 0.10"
optional = true
[lints.rust.unexpected_cfgs]
diff --git a/src/rng.rs b/src/rng.rs
index 894ceac..353db71 100644
--- a/src/rng.rs
+++ b/src/rng.rs
@@ -54,7 +54,7 @@ mod imp {
fn u128() -> u128 {
let mut bytes = [0u8; 16];
- getrandom::fill(&mut bytes).unwrap_or_else(|err| {
+ getrandom::getrandom(&mut bytes).unwrap_or_else(|err| {
// NB: getrandom::Error has no source; this is adequate display
panic!("could not retrieve random bytes for uuid: {}", err)
});
@@ -65,7 +65,7 @@ mod imp {
fn u64() -> u64 {
let mut bytes = [0u8; 8];
- getrandom::fill(&mut bytes).unwrap_or_else(|err| {
+ getrandom::getrandom(&mut bytes).unwrap_or_else(|err| {
// NB: getrandom::Error has no source; this is adequate display
panic!("could not retrieve random bytes for uuid: {}", err)
});
@@ -76,7 +76,7 @@ mod imp {
fn u16() -> u16 {
let mut bytes = [0u8; 2];
- getrandom::fill(&mut bytes).unwrap_or_else(|err| {
+ getrandom::getrandom(&mut bytes).unwrap_or_else(|err| {
// NB: getrandom::Error has no source; this is adequate display
panic!("could not retrieve random bytes for uuid: {}", err)
});
|