From d8a0290b381f9dab135507ce752d4e67af827341 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Mon, 24 Aug 2026 15:39:22 +0900 Subject: [PATCH] bobbin,knot2: `cargo fmt` Signed-off-by: Seongmin Lee --- bobbin/crates/xrpc/src/lib.rs | 5 +---- bobbin/crates/xrpc/tests/aggregation.rs | 22 +++++++++------------- knot2/crates/knot-git/src/repo.rs | 15 ++++++++------- knot2/crates/knot-xrpc/src/git.rs | 2 +- 4 files changed, 19 insertions(+), 25 deletions(-) diff --git a/bobbin/crates/xrpc/src/lib.rs b/bobbin/crates/xrpc/src/lib.rs index f2cc747c1..e38d277f3 100644 --- a/bobbin/crates/xrpc/src/lib.rs +++ b/bobbin/crates/xrpc/src/lib.rs @@ -2978,10 +2978,7 @@ async fn list_recipients( )); }; - let key = EdgeKey::new( - nsid_static("org.tangled.feed.subscription"), - subject_ref, - ); + let key = EdgeKey::new(nsid_static("org.tangled.feed.subscription"), subject_ref); let sources = state.edges.sources_for(&key); let mut seen = BTreeSet::new(); let mut dids = Vec::new(); diff --git a/bobbin/crates/xrpc/tests/aggregation.rs b/bobbin/crates/xrpc/tests/aggregation.rs index e65c8681d..b50725c26 100644 --- a/bobbin/crates/xrpc/tests/aggregation.rs +++ b/bobbin/crates/xrpc/tests/aggregation.rs @@ -3037,10 +3037,8 @@ async fn list_recipients_entity_subject_returns_subscriber_dids() { .await .unwrap(); assert_eq!(resp.status(), StatusCode::OK); - let body: Value = serde_json::from_slice( - &to_bytes(resp.into_body(), 1 << 20).await.unwrap(), - ) - .unwrap(); + let body: Value = + serde_json::from_slice(&to_bytes(resp.into_body(), 1 << 20).await.unwrap()).unwrap(); assert_eq!(body["dids"], json!(["did:plc:bob"])); } @@ -3057,17 +3055,17 @@ async fn list_recipients_repo_subject_returns_repo_subscribers() { let resp = router(h.state.clone()) .oneshot( Request::builder() - .uri("/xrpc/org.tangled.temp.notification.listRecipients?subject=did:plc:targetrepo") + .uri( + "/xrpc/org.tangled.temp.notification.listRecipients?subject=did:plc:targetrepo", + ) .body(Body::empty()) .unwrap(), ) .await .unwrap(); assert_eq!(resp.status(), StatusCode::OK); - let body: Value = serde_json::from_slice( - &to_bytes(resp.into_body(), 1 << 20).await.unwrap(), - ) - .unwrap(); + let body: Value = + serde_json::from_slice(&to_bytes(resp.into_body(), 1 << 20).await.unwrap()).unwrap(); assert_eq!(body["dids"], json!(["did:plc:watcher"])); } @@ -3084,9 +3082,7 @@ async fn list_recipients_empty_for_unknown_subject() { .await .unwrap(); assert_eq!(resp.status(), StatusCode::OK); - let body: Value = serde_json::from_slice( - &to_bytes(resp.into_body(), 1 << 20).await.unwrap(), - ) - .unwrap(); + let body: Value = + serde_json::from_slice(&to_bytes(resp.into_body(), 1 << 20).await.unwrap()).unwrap(); assert_eq!(body["dids"], json!([])); } diff --git a/knot2/crates/knot-git/src/repo.rs b/knot2/crates/knot-git/src/repo.rs index 1ff94c405..5f2cbf2c0 100644 --- a/knot2/crates/knot-git/src/repo.rs +++ b/knot2/crates/knot-git/src/repo.rs @@ -508,13 +508,14 @@ impl Repo { } pub fn set_reference(&self, name: &RefName, target: Oid) -> Result<(), GitError> { - self.git.reference( - name.as_str(), - target, - PreviousValue::Any, - "update ref to target commit", - ) - .map_err(|error| GitError::Backend(error.to_string()))?; + self.git + .reference( + name.as_str(), + target, + PreviousValue::Any, + "update ref to target commit", + ) + .map_err(|error| GitError::Backend(error.to_string()))?; Ok(()) } diff --git a/knot2/crates/knot-xrpc/src/git.rs b/knot2/crates/knot-xrpc/src/git.rs index e8d9882e7..83568a2fc 100644 --- a/knot2/crates/knot-xrpc/src/git.rs +++ b/knot2/crates/knot-xrpc/src/git.rs @@ -10,7 +10,7 @@ use knot_types::{Oid, RefName, RepoDid}; use lexicons::sh_tangled::git::keep_commit::{self, KeepCommitSource}; use crate::error::XrpcError; -use crate::{run_blocking, XrpcState}; +use crate::{XrpcState, run_blocking}; pub(crate) const KEEP_COMMIT_ROUTE: &str = "/xrpc/sh.tangled.git.keepCommit"; -- 2.51.2