We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a005aa6 commit 2ac0d63Copy full SHA for 2ac0d63
1 file changed
libraries/cryptids/src/crng.rs
@@ -24,7 +24,7 @@ cfg_feature_std! {
24
}
25
#[cfg(target_os = "linux")]
26
{
27
- std::fs::File::open("/dev/urandom").ok()?
+ return std::fs::File::open("/dev/urandom").ok()?
28
.read_be_u64().ok()
29
30
#[cfg(target_arch = "wasm32")]
@@ -33,9 +33,8 @@ cfg_feature_std! {
33
let w = web_sys::window()?;
34
let c = w.crypto().ok()?;
35
c.get_random_values_with_u8_array(&mut v).ok()?;
36
- Some(u64::from_be_bytes(v))
+ return Some(u64::from_be_bytes(v))
37
38
- #[cfg(not(any(target_arch = "x86_64", target_arch = "wasm32")))]
39
None
40
41
0 commit comments