Skip to content

Commit fac73a2

Browse files
authored
webidl: make from_js_value visible for enums
Make from_js_value match the visibility of the enum it's associated with
1 parent 4c7b130 commit fac73a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/backend/src/codegen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ impl ToTokens for ast::ImportEnum {
626626
}
627627

628628
impl #name {
629-
fn from_js_value(obj: ::wasm_bindgen::JsValue) -> Option<#name> {
629+
#vis fn from_js_value(obj: ::wasm_bindgen::JsValue) -> Option<#name> {
630630
obj.as_string().and_then(|obj_str| match obj_str.as_str() {
631631
#(#variant_strings => Some(#variant_paths_ref),)*
632632
_ => None,

0 commit comments

Comments
 (0)