Skip to content

Commit 398be48

Browse files
committed
borrow from_js_value argument
1 parent c7fc6d3 commit 398be48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/backend/src/codegen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ impl ToTokens for ast::ImportEnum {
616616
}
617617

618618
impl #name {
619-
#vis fn from_js_value(obj: ::wasm_bindgen::JsValue) -> Option<#name> {
619+
#vis fn from_js_value(obj: &::wasm_bindgen::JsValue) -> Option<#name> {
620620
obj.as_string().and_then(|obj_str| match obj_str.as_str() {
621621
#(#variant_strings => Some(#variant_paths_ref),)*
622622
_ => None,
@@ -647,7 +647,7 @@ impl ToTokens for ast::ImportEnum {
647647
js: Self::Abi,
648648
extra: &mut ::wasm_bindgen::convert::Stack,
649649
) -> Self {
650-
#name::from_js_value(::wasm_bindgen::JsValue::from_abi(js, extra)).expect(#expect_string)
650+
#name::from_js_value(&::wasm_bindgen::JsValue::from_abi(js, extra)).expect(#expect_string)
651651
}
652652
}
653653

0 commit comments

Comments
 (0)