Skip to content

Commit 6608828

Browse files
committed
webidl: use JSValue::from in IntoWasmAbi for enums
1 parent c56b1b0 commit 6608828

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/backend/src/codegen.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,9 +645,7 @@ impl ToTokens for ast::ImportEnum {
645645
::wasm_bindgen::convert::IntoWasmAbi>::Abi;
646646

647647
fn into_abi(self, extra: &mut ::wasm_bindgen::convert::Stack) -> Self::Abi {
648-
match self {
649-
#(#variant_paths_ref => ::wasm_bindgen::JsValue::from_str(#variant_strings).into_abi(extra),)*
650-
}
648+
::wasm_bindgen::JsValue::from(self).into_abi(extra)
651649
}
652650
}
653651

0 commit comments

Comments
 (0)