Skip to content

fix: last clippy error breaking master CI (collapsible_match)#30

Merged
Liorrr merged 1 commit into
masterfrom
fix/ci-clippy-master
Jun 19, 2026
Merged

fix: last clippy error breaking master CI (collapsible_match)#30
Liorrr merged 1 commit into
masterfrom
fix/ci-clippy-master

Conversation

@Liorrr

@Liorrr Liorrr commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Master CI's Clippy job is still red after #29. #29 fixed the 5 shrimpk-memory errors, which then unmasked a 6th error in cli/tui.rs:574 (clippy stops at the first failing crate, so it was never visible until the memory errors were cleared).

This PR fixes that last error:

  • cli/tui.rs: convert KeyCode::Home/End arms with an inner if !filtered.is_empty() into match guards. Behavior-preserving — an empty list falls through to the no-op _ arm exactly as before.

Root cause

CI uses dtolnay/rust-toolchain@stable (a floating toolchain). When the runners moved to Rust 1.96, strengthened/new lints (sort_by_key, redundant into_iter, collapsible_match) turned already-committed KS78 code into hard -D warnings errors — breaking master and every branch with zero code changes.

Verified locally on the matching toolchain (rustc 1.96.0, hash ac68faa20):

  • cargo clippy --workspace --all-targets --exclude shrimpk-tray --exclude shrimpk-viz -- -D warnings → exit 0
  • cargo fmt --check → exit 0

Follow-up (separate, not in this PR)

Consider pinning the toolchain via rust-toolchain.toml so local and CI can never diverge again.

Test plan

  • CI Clippy job green on this PR

cli/tui.rs: convert KeyCode::Home/End arms with inner `if !filtered.is_empty()`
into match guards. Behavior-preserving — an empty list falls through to the
no-op `_` arm exactly as before.

This was the last clippy error breaking master CI. It was hidden behind the
shrimpk-memory errors (fixed in #29) because clippy stops at the first failing
crate. Surfaced only on Rust 1.96 stable; CI's floating @stable toolchain
picked up the new lints, turning already-committed code into hard errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Liorrr
Liorrr merged commit eea7858 into master Jun 19, 2026
6 checks passed
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