mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-17 15:01:23 +00:00
WebIDL: Handle Invalid Enum Returns (#477)
* move ImportEnum attributes to a property * borrow from_js_value argument * make WebIDL enums non-exhaustive * add more tests for WebIDL enums
This commit is contained in:
committed by
Alex Crichton
parent
5fddcf3868
commit
b3ee71c20b
@ -14,7 +14,9 @@ extern crate heck;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate proc_macro2;
|
||||
#[macro_use]
|
||||
extern crate quote;
|
||||
#[macro_use]
|
||||
extern crate syn;
|
||||
extern crate wasm_bindgen_backend as backend;
|
||||
extern crate webidl;
|
||||
@ -640,6 +642,7 @@ impl<'a> WebidlParse<()> for webidl::ast::Enum {
|
||||
.map(|v| rust_ident(v.to_camel_case().as_str()))
|
||||
.collect(),
|
||||
variant_values: self.variants.clone(),
|
||||
rust_attrs: vec![parse_quote!(#[derive(Copy, Clone, PartialEq, Debug)])],
|
||||
}),
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user