feat: replace persist with insert (in memory)

This commit is contained in:
2025-09-29 13:18:53 +02:00
parent 5d06946a4c
commit b7790e2f47
2 changed files with 4 additions and 5 deletions

View File

@@ -13,9 +13,9 @@ impl O {
..O::default() ..O::default()
} }
} }
pub fn persist(&mut self, entity: &mut Entity) { pub fn insert(&mut self, object: impl ToEAV) {
self.items.insert(entity.id.clone(), entity.clone()); let entity = object.to_eav();
entity.persisted = true; self.items.insert(entity.id.clone(), entity);
} }
} }

View File

@@ -130,7 +130,6 @@ mod tests {
name: "laptop".to_string(), name: "laptop".to_string(),
price: 200000u64, price: 200000u64,
}; };
let mut entity = product.to_eav(); catalog.insert(product);
catalog.persist(&mut entity);
} }
} }