Skip to content

Commit 5a1678e

Browse files
committed
clippy: use of followed by a function call
1 parent b204710 commit 5a1678e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/webidl/src/first_pass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl FirstPass for webidl::ast::NonPartialMixin {
125125
let entry = record
126126
.mixins
127127
.entry(self.name.clone())
128-
.or_insert(Default::default());
128+
.or_insert_with(Default::default);
129129
if mem::replace(&mut entry.non_partial, Some(self)).is_some() {
130130
warn!(
131131
"Encounterd multiple declarations of {}, using last encountered",
@@ -142,7 +142,7 @@ impl FirstPass for webidl::ast::PartialMixin {
142142
let entry = record
143143
.mixins
144144
.entry(self.name.clone())
145-
.or_insert(Default::default());
145+
.or_insert_with(Default::default);
146146
entry.partials.push(self);
147147

148148
Ok(())

0 commit comments

Comments
 (0)