Skip to content

Commit

Permalink
replace unreachable! with panic!
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Dec 29, 2018
1 parent 38f7be6 commit eac492e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rand_os/src/wasm32_stdweb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl OsRngImpl for OsRng {

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

0 comments on commit eac492e

Please sign in to comment.