Skip to content

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

refactor(memory): drop redundant into calls on error conversions

Steven Enamakelc93c3b9b1830
diff --git a/crates/openhuman-core/src/memory/layout_migration/app_host.rs b/crates/openhuman-core/src/memory/layout_migration/app_host.rs
index f7b19967f0..9807ec1080 100644
--- a/crates/openhuman-core/src/memory/layout_migration/app_host.rs
+++ b/crates/openhuman-core/src/memory/layout_migration/app_host.rs
@@ -57,7 +57,7 @@ pub(super) fn to_module(error: Error) -> lm::Error {
/// The module's error as the host's wire taxonomy.
pub(super) fn from_module(error: lm::Error) -> Error {
match error {
- lm::Error::Engine(error) => error.into(),
+ lm::Error::Engine(error) => error,
lm::Error::Off(message) => Error::Off(message),
lm::Error::InvalidRequest(message) => Error::InvalidRequest(message),
lm::Error::State(message) => Error::Engine(message),
diff --git a/crates/openhuman-core/src/memory/sources/mod.rs b/crates/openhuman-core/src/memory/sources/mod.rs
index 03f70ac459..fb6f47e27a 100644
--- a/crates/openhuman-core/src/memory/sources/mod.rs
+++ b/crates/openhuman-core/src/memory/sources/mod.rs
@@ -178,7 +178,7 @@ pub async fn forget_items(config: &Config, id: &str) -> Result<usize> {
Ok(report) => report,
Err(error) => {
crate::memory::deletion::enqueue(&config.workspace_dir, pending());
- return Err(error.into());
+ return Err(error);
}
};
tracing::debug!(id = %id, forgotten = report.forgotten, "[memory:sources] items forgotten");
diff --git a/crates/openhuman-core/src/memory/sources/sync.rs b/crates/openhuman-core/src/memory/sources/sync.rs
index f29d9a8c7a..4486cb8715 100644
--- a/crates/openhuman-core/src/memory/sources/sync.rs
+++ b/crates/openhuman-core/src/memory/sources/sync.rs
@@ -49,7 +49,7 @@ fn host_error(error: SyncError) -> Error {
SyncError::Read(message) => {
Error::Engine(format!("reading the source failed: {message}"))
}
- SyncError::Engine(error) => error.into(),
+ SyncError::Engine(error) => error,
}
}