mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-28 23:14:12 +03:00
webidl: use JSValue::from in IntoWasmAbi
for enums
This commit is contained in:
parent
c56b1b0189
commit
6608828d72
@ -645,9 +645,7 @@ impl ToTokens for ast::ImportEnum {
|
||||
::wasm_bindgen::convert::IntoWasmAbi>::Abi;
|
||||
|
||||
fn into_abi(self, extra: &mut ::wasm_bindgen::convert::Stack) -> Self::Abi {
|
||||
match self {
|
||||
#(#variant_paths_ref => ::wasm_bindgen::JsValue::from_str(#variant_strings).into_abi(extra),)*
|
||||
}
|
||||
::wasm_bindgen::JsValue::from(self).into_abi(extra)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user