fix: last clippy error breaking master CI (collapsible_match)#30
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Master CI's Clippy job is still red after #29.
#29fixed the 5shrimpk-memoryerrors, which then unmasked a 6th error incli/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: convertKeyCode::Home/Endarms with an innerif !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, redundantinto_iter,collapsible_match) turned already-committed KS78 code into hard-D warningserrors — 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 0cargo fmt --check→ exit 0Follow-up (separate, not in this PR)
Consider pinning the toolchain via
rust-toolchain.tomlso local and CI can never diverge again.Test plan