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

Commit 6ba0700

Browse files
committed
Implement FromJSValConvertible for HandleValue
1 parent 7f380ab commit 6ba0700

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/conversions.rs

+10
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,16 @@ impl ToJSValConvertible for () {
184184
}
185185
}
186186

187+
impl FromJSValConvertible for HandleValue {
188+
#[inline]
189+
unsafe fn from_jsval(_cx: *mut JSContext,
190+
value: HandleValue,
191+
_option: ())
192+
-> Result<ConversionResult<HandleValue>, ()> {
193+
Ok(ConversionResult::Success(value))
194+
}
195+
}
196+
187197
impl FromJSValConvertible for JSVal {
188198
type Config = ();
189199
unsafe fn from_jsval(_cx: *mut JSContext,

0 commit comments

Comments
 (0)