summaryrefslogtreecommitdiff
path: root/ext/napi/value.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/napi/value.rs')
-rw-r--r--ext/napi/value.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/napi/value.rs b/ext/napi/value.rs
index 6fb96758c..71beac07e 100644
--- a/ext/napi/value.rs
+++ b/ext/napi/value.rs
@@ -31,9 +31,7 @@ where
v8::Local<'s, T>: Into<v8::Local<'s, v8::Value>>,
{
fn from(v: v8::Local<'s, T>) -> Self {
- // SAFETY: It is safe to cast v8::Local<T> that implements Into<v8::Local<v8::Value>>.
- // `fn into(self)` transmutes anyways.
- Self(unsafe { transmute(v) }, std::marker::PhantomData)
+ Self(Some(NonNull::from(&*v.into())), std::marker::PhantomData)
}
}