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

Commit d038cd5

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

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/conversions.rs

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

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

0 commit comments

Comments
 (0)