chore(clippy): the lints newer toolchains enforce - #252
Open
bdelanghe wants to merge 1 commit into
Open
Conversation
rust-toolchain.toml pins 1.94.0 and CI installs it, so nothing here has
ever been checked against a newer clippy. Anyone whose toolchain comes
from somewhere else — nixpkgs currently ships 1.97 — gets eight errors on
a clean tree, which makes `just clippy` useless to them.
All mechanical, no behaviour change:
unnecessary_sort_by six flipped comparators become sort_by_key with
Reverse. Same order, and the key form states the
intent instead of leaving the reader to work out
which side of the comparison was swapped.
needless_borrows_for_ two `&` in println! arguments that Display would
generic_args take by reference anyway.
Verified under 1.97: clippy --workspace -D warnings clean, cargo fmt
clean, path-cli 418 and toolpath-pi 133 unit tests pass. The 1.94.0 pin
is unchanged — this only removes the gap between it and later releases.
10 tasks
|
🔍 Preview deployed: https://ba950533.toolpath.pages.dev |
bdelanghe
marked this pull request as ready for review
September 1, 2026 18:36
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.
rust-toolchain.tomlpins1.94.0and CI installs exactly that, so nothing in this repo has ever been checked against a newer clippy. Anyone whose toolchain comes from somewhere else — nixpkgs currently ships 1.97 — gets eight errors on a clean tree, which makesjust clippyuseless to them.Found while wiring up #250 (a devShell), where
gate_clippywas the one gate that would not go green.All mechanical, no behaviour change
unnecessary_sort_bysort_by_keywithstd::cmp::Reverseneedless_borrows_for_generic_args&in aprintln!argument thatDisplaytakes by reference anywayEvery sort keeps its ordering — all six were "newest first", and
Reverseon aCopykey (SystemTime,Option<DateTime<Utc>>) expresses that directly rather than leaving the reader to work out which side of the comparison was swapped.The 1.94.0 pin is untouched. This does not adopt a newer toolchain; it only removes the gap between the pinned one and later releases, so the tree is clean under both.
Verified under 1.97
path-cli418 andtoolpath-pi133 unit tests pass; clippy and fmt clean under 1.97unnecessary_sort_byandneedless_borrows_for_generic_argstightened in later releases, so the gap only shows on a toolchain from elsewhereNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.