Skip to content

Commit 5f845af

Browse files
committed
fix(clippy): inline variables in format strings in agent guard
1 parent 2be7b98 commit 5f845af

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/main.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ async fn run_command(command: Command, is_agent: bool) -> Result<()> {
199199
fn check_agent_guard(is_agent: bool, command_hint: &str) -> Result<()> {
200200
if is_agent {
201201
anyhow::bail!(
202-
"AGENT_GUARD_BLOCK: This command alters production data or sends external communications and cannot be executed autonomously. You must stop and ask the human user to run the following command in their terminal:\n\ncnctl {}\n\nDo not attempt to bypass this.",
203-
command_hint
202+
"AGENT_GUARD_BLOCK: This command alters production data or sends external communications and cannot be executed autonomously. You must stop and ask the human user to run the following command in their terminal:\n\ncnctl {command_hint}\n\nDo not attempt to bypass this."
204203
);
205204
}
206205
Ok(())
@@ -252,14 +251,14 @@ async fn run_admin_command(cmd: AdminCommand, is_agent: bool) -> Result<()> {
252251
commands::sponsors::update_contract(&id, &status).await
253252
}
254253
SponsorCommand::SendContract { id, template } => {
255-
check_agent_guard(is_agent, &format!("admin sponsors send-contract {}", id))?;
254+
check_agent_guard(is_agent, &format!("admin sponsors send-contract {id}"))?;
256255
commands::sponsors::send_contract(&id, template.as_deref()).await
257256
}
258257
SponsorCommand::SignatureStatus { id } => {
259258
commands::sponsors::signature_status(&id).await
260259
}
261260
SponsorCommand::DeleteActivity { id } => {
262-
check_agent_guard(is_agent, &format!("admin sponsors delete-activity {}", id))?;
261+
check_agent_guard(is_agent, &format!("admin sponsors delete-activity {id}"))?;
263262
commands::sponsors::delete_activity(&id).await
264263
}
265264
SponsorCommand::Assign { id, speaker_id } => {

0 commit comments

Comments
 (0)