Skip to content

chore: fix clippy lints from newer toolchains - #62

Merged
zawakin merged 2 commits into
mainfrom
chore/fix-clippy-lints
Jul 10, 2026
Merged

chore: fix clippy lints from newer toolchains#62
zawakin merged 2 commits into
mainfrom
chore/fix-clippy-lints

Conversation

@zawakin

@zawakin zawakin commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Why

mise run verify fails on local toolchains newer than the pinned 1.90.0 (e.g. mise's cargo 1.93) because recent clippy versions promoted new cases of collapsible_match and unnecessary_sort_by, and verify runs clippy with -D warnings. These 10 findings are pre-existing on main and unrelated to any recent change.

What

All fixes are mechanical and behavior-preserving:

  • collapsible_match — collapse match arms containing a lone if into guarded arms (watch_tui.rs, engine/export.rs, codex/io.rs). The non-matching cases fall through to the existing _ => {} arms, so behavior is identical.
  • unnecessary_sort_by — rewrite sort_by(|a, b| ...cmp...) as sort_by_key, using std::cmp::Reverse for the descending sorts (runtime/streamer.rs, storage/repository.rs, presenters/project.rs, 3 SDK examples). sort_by_key is also a stable sort, so same-timestamp event ordering is preserved.
  • One test assertion simplification in agtrace-core suggested by clippy.

Verification

  • mise run verify (fmt + clippy -D warnings + test + build) now passes locally on cargo 1.93; clippy warning count is 0 across the workspace including --all-targets.
  • All tests pass.

🤖 Generated with Claude Code

…ecessary_sort_by)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@zawakin zawakin self-assigned this Jul 10, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@zawakin
zawakin merged commit f0bf5cf into main Jul 10, 2026
8 checks passed
@zawakin
zawakin deleted the chore/fix-clippy-lints branch July 10, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant