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 fitzgen committed May 11, 2017
1 parent 478305b commit add34bd
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 add34bd

Please sign in to comment.