From cb30ba9469521c35b2c4ccb3ddd4b02d66432d19 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Mon, 19 Oct 2026 20:14:07 +0200 Subject: [PATCH] style(claw): rustfmt the watch-credential change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The credential-resolution commit landed with two violations this editor's format-on-save caught — an unsorted import in the handler and wrapping in the daemon and source — reformatted here so the tree is cargo-fmt clean. --- crates/rhema-claw/src/daemon.rs | 8 ++++++-- crates/rhema-claw/src/forge.rs | 15 ++++++++------- crates/rhema-claw/src/handler.rs | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/crates/rhema-claw/src/daemon.rs b/crates/rhema-claw/src/daemon.rs index 90f6b96..002dfc4 100644 --- a/crates/rhema-claw/src/daemon.rs +++ b/crates/rhema-claw/src/daemon.rs @@ -241,8 +241,12 @@ impl Daemon { // The forge handler resolves its watches through the table at // dispatch time, so a watch added mid-run is answerable without a // restart. - let forge_handler = - ClawHandler::new(backends.clone(), workspace_root, watches.clone(), accounts.clone()); + let forge_handler = ClawHandler::new( + backends.clone(), + workspace_root, + watches.clone(), + accounts.clone(), + ); // Three drivers over one store admit from the same table, so // each owns its slice of the key space: a forge pass must never // pick up a resident or job event (it would fail it, and diff --git a/crates/rhema-claw/src/forge.rs b/crates/rhema-claw/src/forge.rs index a94f82e..0edcf87 100644 --- a/crates/rhema-claw/src/forge.rs +++ b/crates/rhema-claw/src/forge.rs @@ -432,12 +432,8 @@ mod tests { .with_url("https://git.example"); accounts.put(account).expect("account lands"); - let resolved = resolve_watch_token( - &accounts, - ForgeKind::Gitea, - Some("https://git.example"), - "", - ); + let resolved = + resolve_watch_token(&accounts, ForgeKind::Gitea, Some("https://git.example"), ""); assert_eq!(resolved.as_deref(), Some("acct-tok")); } @@ -476,7 +472,12 @@ mod tests { .expect("account lands"); // The same instance through case and a trailing slash matches. assert_eq!( - resolve_watch_token(&accounts, ForgeKind::Gitea, Some("HTTPS://GIT.example/"), "") + resolve_watch_token( + &accounts, + ForgeKind::Gitea, + Some("HTTPS://GIT.example/"), + "" + ) .as_deref(), Some("yes") ); diff --git a/crates/rhema-claw/src/handler.rs b/crates/rhema-claw/src/handler.rs index fafa8eb..9bec25a 100644 --- a/crates/rhema-claw/src/handler.rs +++ b/crates/rhema-claw/src/handler.rs @@ -31,11 +31,11 @@ use rhema_agent_tools::AllowAll; use rhema_autonomous_agent::{Handler, SessionContext, async_trait}; use rhema_coding_agent::{CodingAgent, CodingAgentConfig}; use rhema_core::{Content, Event as ModelEvent, EventSink, Message, Session}; -use rhema_identity::IdentityStore; use rhema_forge_integration::{ EventKind, Forge, ForgeError, ForgeEvent, Notification, RepoRef, Snapshot, ThreadState, decode, parse_key, }; +use rhema_identity::IdentityStore; use rhema_rsd::{InboxItem, Outcome, ResourceKey}; use crate::backends::BackendRegistry;