From 5a9b1a97abbcb89e603dd0d4524a05a48cf29e72 Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Sat, 4 Oct 2025 06:44:26 +0200 Subject: [PATCH] refactor: call catalog.insert while looping during catalog.insert_many --- 01.workspace/heave/src/str/catalog.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/01.workspace/heave/src/str/catalog.rs b/01.workspace/heave/src/str/catalog.rs index d9ea673..b0cbf4e 100644 --- a/01.workspace/heave/src/str/catalog.rs +++ b/01.workspace/heave/src/str/catalog.rs @@ -48,9 +48,7 @@ impl O { /// * `objects` - A vector of objects to insert. pub fn insert_many(&mut self, objects: Vec) { for object in objects { - let mut entity = object.into(); - entity.state = EntityState::New; - self.items.insert(entity.id.clone(), entity); + self.insert(object); } }