Skip to content

Commit

Permalink
Fix clippy warning unwrap_or_default
Browse files Browse the repository at this point in the history
  • Loading branch information
patowen committed Oct 17, 2023
1 parent f3bbe18 commit f0a5f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/src/graph_entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl GraphEntities {
}

pub fn insert(&mut self, node: NodeId, entity: Entity) {
let vec = self.map.entry(node).or_insert_with(Vec::new);
let vec = self.map.entry(node).or_default();
debug_assert!(!vec.contains(&entity), "redundant insert");
vec.push(entity);
}
Expand Down

0 comments on commit f0a5f6c

Please sign in to comment.