mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-28 20:43:23 +03:00
Add #[derive(Clone, Debug)]
to all web-sys types
They're all cloneable and debuggable!
This commit is contained in:
parent
35f5127010
commit
3f68c43d06
@ -468,11 +468,18 @@ impl<'src> FirstPassRecord<'src> {
|
||||
name,
|
||||
mdn_doc(name, None),
|
||||
));
|
||||
let derive = syn::Attribute {
|
||||
pound_token: Default::default(),
|
||||
style: syn::AttrStyle::Outer,
|
||||
bracket_token: Default::default(),
|
||||
path: Ident::new("derive", Span::call_site()).into(),
|
||||
tts: quote!((Debug, Clone)),
|
||||
};
|
||||
let mut import_type = backend::ast::ImportType {
|
||||
vis: public(),
|
||||
rust_name: rust_ident(camel_case_ident(name).as_str()),
|
||||
js_name: name.to_string(),
|
||||
attrs: Vec::new(),
|
||||
attrs: vec![derive],
|
||||
doc_comment: None,
|
||||
instanceof_shim: format!("__widl_instanceof_{}", name),
|
||||
extends: self.all_superclasses(name)
|
||||
|
Loading…
Reference in New Issue
Block a user