diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-03-12 16:53:31 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-03-12 16:53:31 +0100 |
| commit | 7bf3c633703e4cea6df7c5b445e26649a7196db6 (patch) | |
| tree | 76c2480c25240d3c90ca20fba6d3130f265a6d34 | |
| parent | a7e8095bdaa6ebec05a20e76c6d936827f586731 (diff) | |
| download | jellything-7bf3c633703e4cea6df7c5b445e26649a7196db6.tar jellything-7bf3c633703e4cea6df7c5b445e26649a7196db6.tar.bz2 jellything-7bf3c633703e4cea6df7c5b445e26649a7196db6.tar.zst | |
modify object_extend to replace existing fields
| -rw-r--r-- | common/object/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<Object> { 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); |