You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: clear 53 pre-existing clippy warnings to unblock -D warnings
Slice 8 (verification gate). After this commit
`cargo clippy --workspace --all-targets -- -D warnings`
passes for the first time in this repo.
Mechanical fixes via `cargo clippy --fix` (28 warnings cleared):
redundant closures, expression auto-borrow, `if` collapse,
`for` loop conversion, derivable `Default` impl, `Default`
on StreamAccumulator, casting to same type, redundant
`is_some` patterns, etc.
Hand-applied fixes (25 warnings cleared):
* core/src/lib.rs:
- Replace `let mut cfg = Config::default(); cfg.field = ...`
in 3 tests with struct-update syntax (matches AGENTS.md
rule: no field-assignment-after-default).
- `sessions.sort_by(...)` → `sessions.sort_by_key(...)`.
- Collapse two identical `if` branches into a single
condition in the AcceptEdits PermissionMode arm.
- Same in the pricing model_router for `-free` / `free/` /
`is_free_upstream_model` paths.
* core/src/system_prompt.rs:
- Rename `OutputStyle::from_str` → `from_label` so it no
longer collides with the std `FromStr` trait method
(its infallible "fallback to Default" semantics would
violate the FromStr contract).
- Replace `let mut parts = Vec::new(); parts.push(...);`
with a single `vec![...]` literal.
* cli/src/main.rs:
- Reformat the `/coven-code models` doc list to drop the
overindentation clippy now warns about (4 entries).
- `loop { match try_recv() { Ok(t) => ..., Err(_) => break } }`
→ `while let Ok(t) = try_recv() { ... }`.
* tui/src/message_copy.rs:
- Replace `if line.starts_with("```") { ... line[3..] ... }`
with `if let Some(rest) = line.strip_prefix("```")`.
* query/src/lib.rs:
- Collapse `if let ContentBlock::ToolUse {...}` into the
outer `match` arm pattern.
* query/src/lib.rs and cli/src/main.rs:
- `#[allow(clippy::too_many_arguments)]` with a comment
justifying it on `run_query_loop` (9 args) and
`run_interactive` (12 args). Both have distinct
domain-level inputs that a config struct would just
re-shuffle without improving readability.
Workspace tests still 1525 passing, 0 failing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments