style(claw): rustfmt the watch-credential change
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.
This commit is contained in:
1 parent
1cdc2e8648
commit
cb30ba9469
3 files changed
+15
-10
No files matched your search
@@ -241,8 +241,12 @@ impl Daemon {
|
|||||||
// The forge handler resolves its watches through the table at
|
// The forge handler resolves its watches through the table at
|
||||||
// dispatch time, so a watch added mid-run is answerable without a
|
// dispatch time, so a watch added mid-run is answerable without a
|
||||||
// restart.
|
// restart.
|
||||||
let forge_handler =
|
let forge_handler = ClawHandler::new(
|
||||||
ClawHandler::new(backends.clone(), workspace_root, watches.clone(), accounts.clone());
|
backends.clone(),
|
||||||
|
workspace_root,
|
||||||
|
watches.clone(),
|
||||||
|
accounts.clone(),
|
||||||
|
);
|
||||||
// Three drivers over one store admit from the same table, so
|
// Three drivers over one store admit from the same table, so
|
||||||
// each owns its slice of the key space: a forge pass must never
|
// 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
|
// pick up a resident or job event (it would fail it, and
|
||||||
|
|||||||
@@ -432,12 +432,8 @@ mod tests {
|
|||||||
.with_url("https://git.example");
|
.with_url("https://git.example");
|
||||||
accounts.put(account).expect("account lands");
|
accounts.put(account).expect("account lands");
|
||||||
|
|
||||||
let resolved = resolve_watch_token(
|
let resolved =
|
||||||
&accounts,
|
resolve_watch_token(&accounts, ForgeKind::Gitea, Some("https://git.example"), "");
|
||||||
ForgeKind::Gitea,
|
|
||||||
Some("https://git.example"),
|
|
||||||
"",
|
|
||||||
);
|
|
||||||
assert_eq!(resolved.as_deref(), Some("acct-tok"));
|
assert_eq!(resolved.as_deref(), Some("acct-tok"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -476,7 +472,12 @@ mod tests {
|
|||||||
.expect("account lands");
|
.expect("account lands");
|
||||||
// The same instance through case and a trailing slash matches.
|
// The same instance through case and a trailing slash matches.
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
resolve_watch_token(&accounts, ForgeKind::Gitea, Some("HTTPS://GIT.example/"), "")
|
resolve_watch_token(
|
||||||
|
&accounts,
|
||||||
|
ForgeKind::Gitea,
|
||||||
|
Some("HTTPS://GIT.example/"),
|
||||||
|
""
|
||||||
|
)
|
||||||
.as_deref(),
|
.as_deref(),
|
||||||
Some("yes")
|
Some("yes")
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ use rhema_agent_tools::AllowAll;
|
|||||||
use rhema_autonomous_agent::{Handler, SessionContext, async_trait};
|
use rhema_autonomous_agent::{Handler, SessionContext, async_trait};
|
||||||
use rhema_coding_agent::{CodingAgent, CodingAgentConfig};
|
use rhema_coding_agent::{CodingAgent, CodingAgentConfig};
|
||||||
use rhema_core::{Content, Event as ModelEvent, EventSink, Message, Session};
|
use rhema_core::{Content, Event as ModelEvent, EventSink, Message, Session};
|
||||||
use rhema_identity::IdentityStore;
|
|
||||||
use rhema_forge_integration::{
|
use rhema_forge_integration::{
|
||||||
EventKind, Forge, ForgeError, ForgeEvent, Notification, RepoRef, Snapshot, ThreadState, decode,
|
EventKind, Forge, ForgeError, ForgeEvent, Notification, RepoRef, Snapshot, ThreadState, decode,
|
||||||
parse_key,
|
parse_key,
|
||||||
};
|
};
|
||||||
|
use rhema_identity::IdentityStore;
|
||||||
use rhema_rsd::{InboxItem, Outcome, ResourceKey};
|
use rhema_rsd::{InboxItem, Outcome, ResourceKey};
|
||||||
|
|
||||||
use crate::backends::BackendRegistry;
|
use crate::backends::BackendRegistry;
|
||||||
|
|||||||
Reference in new issue
Block a user