From 7bf3c633703e4cea6df7c5b445e26649a7196db6 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 12 Mar 2026 16:53:31 +0100 Subject: modify object_extend to replace existing fields --- common/object/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/object/src/lib.rs b/common/object/src/lib.rs index aadd306..28a4750 100644 --- a/common/object/src/lib.rs +++ b/common/object/src/lib.rs @@ -181,11 +181,11 @@ impl Object { ) -> Box { let ident = TypedTag::<[u8]>::new(ident); let mut new_vals = Vec::new(); - for ob in self.iter(tag) { - new_vals.push(ob); + for ob in values { + new_vals.push(&**ob); } let mut any_new = false; - for val in values { + for val in self.iter(tag) { if new_vals.iter().all(|rhs| rhs.get(ident) != val.get(ident)) { any_new = true; new_vals.push(val); -- cgit v1.3