We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38f7be6 commit eac492eCopy full SHA for eac492e
rand_os/src/wasm32_stdweb.rs
@@ -40,7 +40,7 @@ impl OsRngImpl for OsRng {
40
41
if ty == 1 { Ok(OsRng(OsRngMethod::Browser)) }
42
else if ty == 2 { Ok(OsRng(OsRngMethod::Node)) }
43
- else { unreachable!() }
+ else { panic!("unexpected ty value: {:?}", ty) }
44
} else {
45
let err: WebError = js!{ return @{ result }.error }.try_into().unwrap();
46
Err(Error::with_cause(ErrorKind::Unavailable, "WASM Error", err))
0 commit comments