Fix pre-existing clippy lints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-04 13:00:02 -05:00
parent 289451e78a
commit bbd71dfbc0
4 changed files with 37 additions and 41 deletions

View file

@ -733,42 +733,43 @@ pub async fn run_command(
HumanDuration(Duration::from_millis(run_duration_ms))
);
let acc = accumulator.lock().unwrap();
let total_tokens = acc.total_input_tokens + acc.total_output_tokens;
if total_tokens > 0 {
if acc.has_pricing {
eprintln!(
"{}",
styles.dim.apply_to(format!(
"Cost: {} ({} tokens)",
format_cost(acc.total_cost),
format_tokens_human(total_tokens)
))
);
} else {
eprintln!("{}", styles.dim.apply_to(format!("Tokens: {}", format_tokens_human(total_tokens))));
}
if acc.total_cache_read_tokens > 0 {
eprintln!(
"{}",
styles.dim.apply_to(format!(
"Cache: {} read, {} write",
format_tokens_human(acc.total_cache_read_tokens),
format_tokens_human(acc.total_cache_write_tokens),
)),
);
}
if acc.total_reasoning_tokens > 0 {
eprintln!(
"{}",
styles.dim.apply_to(format!(
"Reasoning: {} tokens",
format_tokens_human(acc.total_reasoning_tokens),
)),
);
{
let acc = accumulator.lock().unwrap();
let total_tokens = acc.total_input_tokens + acc.total_output_tokens;
if total_tokens > 0 {
if acc.has_pricing {
eprintln!(
"{}",
styles.dim.apply_to(format!(
"Cost: {} ({} tokens)",
format_cost(acc.total_cost),
format_tokens_human(total_tokens)
))
);
} else {
eprintln!("{}", styles.dim.apply_to(format!("Tokens: {}", format_tokens_human(total_tokens))));
}
if acc.total_cache_read_tokens > 0 {
eprintln!(
"{}",
styles.dim.apply_to(format!(
"Cache: {} read, {} write",
format_tokens_human(acc.total_cache_read_tokens),
format_tokens_human(acc.total_cache_write_tokens),
)),
);
}
if acc.total_reasoning_tokens > 0 {
eprintln!(
"{}",
styles.dim.apply_to(format!(
"Reasoning: {} tokens",
format_tokens_human(acc.total_reasoning_tokens),
)),
);
}
}
}
drop(acc);
if let Some(failure) = outcome.failure_reason() {
eprintln!("{}", styles.red.apply_to(format!("Failure: {failure}")),);

View file

@ -1514,7 +1514,7 @@ impl WorkflowRunEngine {
(None, Some(target.clone()))
} else {
let edge = select_edge(&node.id, &outcome, &context, graph);
if let Some(ref e) = edge {
if let Some(e) = &edge {
self.services.emitter.emit(&WorkflowRunEvent::EdgeSelected {
from_node: node.id.clone(),
to_node: e.to.clone(),

View file

@ -735,9 +735,7 @@ fn find_join_node(results: &[BranchResult], graph: &Graph) -> Option<String> {
}
// Find the intersection — nodes reachable from ALL branches
let Some(first) = target_sets.first() else {
return None;
};
let first = target_sets.first()?;
let common: std::collections::HashSet<&String> = first
.iter()
.filter(|id| target_sets.iter().all(|set| set.contains(*id)))

View file

@ -3,7 +3,6 @@ use std::path::Path;
use std::sync::Arc;
use arc_llm::provider::Provider;
use arc_util::terminal::Styles;
use arc_workflows::checkpoint::Checkpoint;
use arc_workflows::cli::backend::AgentApiBackend;
use arc_workflows::context::Context;
@ -7169,8 +7168,6 @@ fn parse_tool_hooks_from_dot_syntax() {
// E2E test with real LLM
// ---------------------------------------------------------------------------
static TEST_STYLES: std::sync::LazyLock<Styles> = std::sync::LazyLock::new(|| Styles::new(false));
#[tokio::test]
#[ignore = "requires ANTHROPIC_API_KEY"]
async fn arc_e2e_with_real_llm() {