From eb65ff7fc22c68210d1e113f76a2a1530fc1c070 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 22 Sep 2016 16:53:53 +0200 Subject: [PATCH] Wrap uses of extern statics in unsafe blocks. This fixes safe_extern_statics warnings; see . --- src/rust.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/rust.rs b/src/rust.rs index 704da6966..8a903d344 100644 --- a/src/rust.rs +++ b/src/rust.rs @@ -440,11 +440,15 @@ impl DerefMut for MutableHandle { impl HandleValue { pub fn null() -> HandleValue { - NullHandleValue + unsafe { + NullHandleValue + } } pub fn undefined() -> HandleValue { - UndefinedHandleValue + unsafe { + UndefinedHandleValue + } } } @@ -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 {