Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

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 committed Sep 22, 2016
1 parent 4f25903 commit eb65ff7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/rust.rs
Expand Up @@ -440,11 +440,15 @@ impl<T> DerefMut for MutableHandle<T> {

impl HandleValue {
pub fn null() -> HandleValue {
NullHandleValue
unsafe {
NullHandleValue
}
}

pub fn undefined() -> HandleValue {
UndefinedHandleValue
unsafe {
UndefinedHandleValue
}
}
}

Expand All @@ -459,7 +463,11 @@ impl HandleObject {
}

impl Default for jsid {
fn default() -> jsid { JSID_VOID }
fn default() -> jsid {
unsafe {
JSID_VOID
}
}
}

impl Default for Value {
Expand Down

0 comments on commit eb65ff7

Please sign in to comment.