Skip to content

Commit eac492e

Browse files
committed
replace unreachable! with panic!
1 parent 38f7be6 commit eac492e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rand_os/src/wasm32_stdweb.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl OsRngImpl for OsRng {
4040

4141
if ty == 1 { Ok(OsRng(OsRngMethod::Browser)) }
4242
else if ty == 2 { Ok(OsRng(OsRngMethod::Node)) }
43-
else { unreachable!() }
43+
else { panic!("unexpected ty value: {:?}", ty) }
4444
} else {
4545
let err: WebError = js!{ return @{ result }.error }.try_into().unwrap();
4646
Err(Error::with_cause(ErrorKind::Unavailable, "WASM Error", err))

0 commit comments

Comments
 (0)