fix(ci): satisfy clippy 1.97 so the Check job goes green - #7
Merged
Conversation
The Check job has been red on all three runners since the toolchain moved to 1.97: `cargo clippy -- -D warnings` reports 4 errors in the bin target. - app.rs / stats.rs: three descending `sort_by` comparators become `sort_by_key(|b| Reverse(..))` (clippy::unnecessary_sort_by). Both APIs are stable sorts and the key is the same value the comparator read, so the resulting order - ties included - is unchanged. - handlers/import.rs: drop the redundant `&` on an eprintln! argument (clippy::useless_borrows_in_formatting). - steam/mod.rs: move `mod tests` below `full_import` (clippy::items_after_test_module). Pure relocation, no line edited. Also clears the lints that only `--all-targets` surfaces, so `cargo clippy --workspace --all-targets -- -D warnings` is clean too: crate-level `//!` header in the integration tests, struct-update syntax instead of a post-default field assignment, `.filter(is_game)`, and a documented `allow(dead_code)` on the mock payload structs whose unread fields exist to pin the API response shape.
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 Check job has been red on all three runners since the toolchain
moved to 1.97:
cargo clippy -- -D warningsreports 4 errors in thebin target.
sort_bycomparators becomesort_by_key(|b| Reverse(..))(clippy::unnecessary_sort_by). BothAPIs are stable sorts and the key is the same value the comparator
read, so the resulting order - ties included - is unchanged.
&on an eprintln! argument(clippy::useless_borrows_in_formatting).
mod testsbelowfull_import(clippy::items_after_test_module). Pure relocation, no line edited.
Also clears the lints that only
--all-targetssurfaces, socargo clippy --workspace --all-targets -- -D warningsis clean too:crate-level
//!header in the integration tests, struct-update syntaxinstead of a post-default field assignment,
.filter(is_game), and adocumented
allow(dead_code)on the mock payload structs whose unreadfields exist to pin the API response shape.