aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-03-12 16:53:31 +0100
committermetamuffin <metamuffin@disroot.org>2026-03-12 16:53:31 +0100
commit7bf3c633703e4cea6df7c5b445e26649a7196db6 (patch)
tree76c2480c25240d3c90ca20fba6d3130f265a6d34 /common
parenta7e8095bdaa6ebec05a20e76c6d936827f586731 (diff)
downloadjellything-7bf3c633703e4cea6df7c5b445e26649a7196db6.tar
jellything-7bf3c633703e4cea6df7c5b445e26649a7196db6.tar.bz2
jellything-7bf3c633703e4cea6df7c5b445e26649a7196db6.tar.zst
modify object_extend to replace existing fields
Diffstat (limited to 'common')
-rw-r--r--common/object/src/lib.rs6
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);