Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(storage): drop redundant clone of stored metadata

Steven Enamakel3374809781e8
diff --git a/crates/openhuman-core/src/security/approval/store_documents.rs b/crates/openhuman-core/src/security/approval/store_documents.rs
index 34b79233b6..69831a7e9c 100644
--- a/crates/openhuman-core/src/security/approval/store_documents.rs
+++ b/crates/openhuman-core/src/security/approval/store_documents.rs
@@ -514,7 +514,7 @@ async fn update(
id: id.to_string(),
version,
doc: next,
- meta: stored.meta.clone(),
+ meta: stored.meta,
}));
}
Err(error) if error.kind() == ErrorKind::Conflict => {}
diff --git a/crates/openhuman-core/src/storage/documents.rs b/crates/openhuman-core/src/storage/documents.rs
index 3654acfe9f..8f941cac05 100644
--- a/crates/openhuman-core/src/storage/documents.rs
+++ b/crates/openhuman-core/src/storage/documents.rs
@@ -264,7 +264,7 @@ pub async fn compare_and_swap(
id: id.to_string(),
version,
doc: next,
- meta: stored.meta.clone(),
+ meta: stored.meta,
}));
}
Err(error) if error.kind() == ErrorKind::Conflict => {}