Skip to content

Commit a2d6a8f

Browse files
committed
Use anyref helper to reduce some code duplication
1 parent a85e49a commit a2d6a8f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

crates/webidl/src/idl_type.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,7 @@ impl<'a> IdlType<'a> {
517517
| IdlType::Dictionary(name)
518518
| IdlType::CallbackInterface { name, .. } => {
519519
let ty = ident_ty(rust_ident(camel_case_ident(name).as_str()));
520-
if pos == TypePosition::Argument {
521-
Some(shared_ref(ty, false))
522-
} else {
523-
Some(ty)
524-
}
520+
anyref(ty)
525521
},
526522
IdlType::Enum(name) => Some(ident_ty(rust_ident(camel_case_ident(name).as_str()))),
527523

0 commit comments

Comments
 (0)