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:
Stephan Wolski 2018-07-11 15:36:41 -04:00 committed by GitHub
parent 4c7b130872
commit fac73a2ea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -626,7 +626,7 @@ impl ToTokens for ast::ImportEnum {
}
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() {
#(#variant_strings => Some(#variant_paths_ref),)*
_ => None,