chore(lint): enable clippy::single_match_else#159
Open
tupe12334 wants to merge 1 commit into
Open
Conversation
Promote clippy::single_match_else to deny (one more step in the incremental Clippy ratchet). Rewrite the single violation in run_clean as a let-else, which expresses the "extract or bail" intent more directly than a two-arm match. Closes #158 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.
Closes #158
Enables
clippy::single_match_else(pedantic) asdenyincore/Cargo.toml, continuing the incremental Clippy ratchet.What the lint catches
A two-arm
matchwhere one arm is trivial/catch-all + an else block — clearer asif let { } else { }orlet … else { }.Change
core/Cargo.toml: addsingle_match_else = "deny".core/src/bin/main.rs: rewrite the one violation inrun_cleanas alet … else, dropping a level of nesting:Verification (matches CI)
cargo fmt --manifest-path core/Cargo.toml -- --check✅cargo clippy --manifest-path core/Cargo.toml --all-targets --locked -- -D warnings✅cargo test --manifest-path core/Cargo.toml --locked✅ (5 passed)RUSTDOCFLAGS="-D warnings" cargo doc --manifest-path core/Cargo.toml --no-deps --locked✅One lint, one fix, no other lints touched.
🤖 Generated with Claude Code