From f0a5f6c5adf63d30ec7545b49d167168b8657ec7 Mon Sep 17 00:00:00 2001 From: Patrick Owen Date: Mon, 16 Oct 2023 21:54:39 -0400 Subject: [PATCH] Fix clippy warning unwrap_or_default --- common/src/graph_entities.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/graph_entities.rs b/common/src/graph_entities.rs index ff3702aa..62ca3ff7 100644 --- a/common/src/graph_entities.rs +++ b/common/src/graph_entities.rs @@ -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); }