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 profile and lease code

Steven Enamakel7b9c06d68920
diff --git a/crates/openhuman-core/src/profiles/host.rs b/crates/openhuman-core/src/profiles/host.rs
index 5324ccf663..fafa95d6b6 100644
--- a/crates/openhuman-core/src/profiles/host.rs
+++ b/crates/openhuman-core/src/profiles/host.rs
@@ -254,7 +254,9 @@ impl ProfileHost {
return Err(match outcome {
Err(error) => OpenError::Storage(error),
_ => {
- log::info!("[profiles] open profile={id}: deprovisioned meanwhile; not reopening");
+ log::info!(
+ "[profiles] open profile={id}: deprovisioned meanwhile; not reopening"
+ );
OpenError::NotProvisioned(id.clone())
}
});
diff --git a/crates/openhuman-core/src/profiles/lifecycle.rs b/crates/openhuman-core/src/profiles/lifecycle.rs
index 0fdad4985f..f9d688dbdc 100644
--- a/crates/openhuman-core/src/profiles/lifecycle.rs
+++ b/crates/openhuman-core/src/profiles/lifecycle.rs
@@ -209,7 +209,11 @@ impl ProfileHost {
/// Take `id`'s lease for a lifecycle change, refusing when another node
/// holds it.
- async fn acquire_for_lifecycle(&self, id: &ProfileId, what: &str) -> Result<LeaseGrant, String> {
+ async fn acquire_for_lifecycle(
+ &self,
+ id: &ProfileId,
+ what: &str,
+ ) -> Result<LeaseGrant, String> {
match self
.leases
.acquire(id.as_str(), profile_lease::now_ms())
diff --git a/crates/openhuman-core/src/profiles/ops.rs b/crates/openhuman-core/src/profiles/ops.rs
index d60f6127b7..ed36da35ba 100644
--- a/crates/openhuman-core/src/profiles/ops.rs
+++ b/crates/openhuman-core/src/profiles/ops.rs
@@ -160,9 +160,7 @@ pub(crate) async fn clear_credential_on(
profile_id: &str,
) -> Result<Outcome<CredentialResult>, String> {
let profile_id = ProfileId::parse(profile_id)?;
- let removed = host
- .with_records(&profile_id, credentials::clear)
- .await?;
+ let removed = host.with_records(&profile_id, credentials::clear).await?;
log::info!("[profiles] credential cleared removed={removed}");
let log = if removed {
"credential cleared"
diff --git a/crates/openhuman-core/src/storage/lease_local_tests.rs b/crates/openhuman-core/src/storage/lease_local_tests.rs
index f5404b28ee..2372eb6bc7 100644
--- a/crates/openhuman-core/src/storage/lease_local_tests.rs
+++ b/crates/openhuman-core/src/storage/lease_local_tests.rs
@@ -137,7 +137,10 @@ async fn releasing_a_key_whose_directory_moved_away_drops_the_stale_holding() {
let key_dir = local_dir(dir.path(), "moved");
std::fs::rename(&key_dir, dir.path().join("archived")).unwrap();
a.release(grant).await.unwrap();
- assert!(!key_dir.exists(), "releasing must not recreate the directory");
+ assert!(
+ !key_dir.exists(),
+ "releasing must not recreate the directory"
+ );
// A fresh directory: `a` takes the real lock again instead of answering
// from a holding on the archived file, so `b` is held out.