mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-28 12:32:37 +03:00
Use anyref
helper to reduce some code duplication
This commit is contained in:
parent
a85e49a2b4
commit
a2d6a8ff53
@ -517,11 +517,7 @@ impl<'a> IdlType<'a> {
|
||||
| IdlType::Dictionary(name)
|
||||
| IdlType::CallbackInterface { name, .. } => {
|
||||
let ty = ident_ty(rust_ident(camel_case_ident(name).as_str()));
|
||||
if pos == TypePosition::Argument {
|
||||
Some(shared_ref(ty, false))
|
||||
} else {
|
||||
Some(ty)
|
||||
}
|
||||
anyref(ty)
|
||||
},
|
||||
IdlType::Enum(name) => Some(ident_ty(rust_ident(camel_case_ident(name).as_str()))),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user