Skip to content

Commit

Permalink
Use unwrap_throw instead of normal unwrap for JsString -> String …
Browse files Browse the repository at this point in the history
…conversion

Should have less code size.
  • Loading branch information
fitzgen committed Feb 10, 2019
1 parent 499ae12 commit c8ad85d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/js-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4339,7 +4339,7 @@ impl From<String> for JsString {

impl<'a> From<&'a JsString> for String {
fn from(s: &'a JsString) -> Self {
s.obj.as_string().unwrap()
s.obj.as_string().unwrap_throw()
}
}

Expand Down

0 comments on commit c8ad85d

Please sign in to comment.