Skip to content

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

style: apply rustfmt formatting to mcp module client

Steven Enamakelaf269c3ff896
diff --git a/crates/openhuman-core/src/mcp/module_client.rs b/crates/openhuman-core/src/mcp/module_client.rs
index c80d97f943..c36bf2dc66 100644
--- a/crates/openhuman-core/src/mcp/module_client.rs
+++ b/crates/openhuman-core/src/mcp/module_client.rs
@@ -431,13 +431,11 @@ impl McpConfiguredClient {
}
fn retire_cached_client(data_dir: &std::path::Path) -> Option<Arc<Self>> {
- let mut clients = CLIENTS
- .get()
- .map(|clients| {
- clients
- .lock()
- .unwrap_or_else(std::sync::PoisonError::into_inner)
- })?;
+ let mut clients = CLIENTS.get().map(|clients| {
+ clients
+ .lock()
+ .unwrap_or_else(std::sync::PoisonError::into_inner)
+ })?;
let client = clients.get(data_dir)?;
client.retiring.store(true, Ordering::Release);
Some(Arc::clone(client))
diff --git a/crates/openhuman-core/src/mcp/module_client_tests.rs b/crates/openhuman-core/src/mcp/module_client_tests.rs
index 2c12642f2d..f6d4c9ba5a 100644
--- a/crates/openhuman-core/src/mcp/module_client_tests.rs
+++ b/crates/openhuman-core/src/mcp/module_client_tests.rs
@@ -457,8 +457,8 @@ async fn failed_agent_close_stays_retired_and_can_be_retried() {
port.fail_first_close
.store(true, std::sync::atomic::Ordering::SeqCst);
let closed = Arc::clone(&port.closed);
- let client = McpConfiguredClient::install_test_port(&config, Box::new(port))
- .expect("install client");
+ let client =
+ McpConfiguredClient::install_test_port(&config, Box::new(port)).expect("install client");
client
.call::<bool>(&configured("server"), "ConnectedOverview", ())
.await
@@ -539,11 +539,9 @@ async fn delayed_agent_close_cannot_evict_a_replacement_cache_entry() {
.unwrap()
.insert(workspace.path().to_path_buf(), Arc::clone(&replacement));
- assert!(McpConfiguredClient::close_retired_client(
- workspace.path().to_path_buf(),
- captured,
- )
- .await);
+ assert!(
+ McpConfiguredClient::close_retired_client(workspace.path().to_path_buf(), captured,).await
+ );
assert_eq!(old_closed.lock().unwrap().len(), 1);
assert!(replacement_closed.lock().unwrap().is_empty());
let current = CLIENTS