mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-30 14:11:21 +00:00
webidl: make from_js_value visible for enums
Make from_js_value match the visibility of the enum it's associated with
This commit is contained in:
parent
4c7b130872
commit
fac73a2ea4
@ -626,7 +626,7 @@ impl ToTokens for ast::ImportEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl #name {
|
impl #name {
|
||||||
fn from_js_value(obj: ::wasm_bindgen::JsValue) -> Option<#name> {
|
#vis fn from_js_value(obj: ::wasm_bindgen::JsValue) -> Option<#name> {
|
||||||
obj.as_string().and_then(|obj_str| match obj_str.as_str() {
|
obj.as_string().and_then(|obj_str| match obj_str.as_str() {
|
||||||
#(#variant_strings => Some(#variant_paths_ref),)*
|
#(#variant_strings => Some(#variant_paths_ref),)*
|
||||||
_ => None,
|
_ => None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user