chore: fix clippy lints failing CI on latest nightly - #69
Merged
Conversation
The clippy CI job installs the latest nightly clippy on every run, and newer lint versions now flag existing code on main: a redundant else after process::exit, redundant borrows in format! args, and an if that can be collapsed into a match guard. The variable_names and src_names_internal fixes mirror the identical changes already made on the transient branch (PR #64) so it rebases cleanly.
Main's lockfile pinned rustix 0.36.8, which uses rustc_* attributes the current nightly compiler rejects, breaking the build/test/lint CI jobs. Lockfile taken verbatim from the transient branch (PR #64), which already contains these bumps.
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.
The clippy CI job (
dtolnay/rust-toolchain@clippy+RUSTFLAGS: -Dwarnings) floats on the latest nightly clippy, and newer lint versions now flag existing code onmain, so every PR currently fails the clippy job regardless of its own changes (see #64, #67). This fixes all of them:redundant_elseinsrc/fmt/mod.rs— else block afterprocess::exit(1)useless_borrows_in_formatting(4x) insrc/check/validators/variable_names.rs— redundant&informat!argscollapsible_matchinsrc/check/validators/src_names_internal.rs—iffolded into a match guardThe
variable_namesandsrc_names_internalfixes intentionally mirror the identical changes already on thetransientbranch (#64) so that branch rebases cleanly once this merges.Verified with
RUSTFLAGS=-Dwarnings cargo +nightly clippy --workspace --all-targets --all-features(nightly 2026-07-24) and the full test suite.Worth considering separately: pinning the clippy toolchain in
ci.ymlso new nightly lints land when we choose, not on whatever PR happens to push next.