Skip to content

Commit

Permalink
Wrap uses of extern statics in unsafe blocks.
Browse files Browse the repository at this point in the history
This fixes safe_extern_statics warnings; see
<rust-lang/rust#36247>.
  • Loading branch information
Ms2ger authored and jdm committed Dec 18, 2017
1 parent f40d7bb commit 1b5cd60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mozjs/js/rust/src/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ impl Default for jsid {
}
}

impl Default for JS::Value {
fn default() -> JS::Value { jsval::UndefinedValue() }
}

impl Default for JS::CompartmentOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
Expand Down

0 comments on commit 1b5cd60

Please sign in to comment.