Skip to content

fix: satisfy clippy unnecessary_sort_by (Rust 1.96)#8

Merged
zombocoder merged 1 commit into
mainfrom
fix/clippy-unnecessary-sort-by
Jul 1, 2026
Merged

fix: satisfy clippy unnecessary_sort_by (Rust 1.96)#8
zombocoder merged 1 commit into
mainfrom
fix/clippy-unnecessary-sort-by

Conversation

@zombocoder

Copy link
Copy Markdown
Owner

Problem

CI clippy (Rust 1.96) fails on main with clippy::unnecessary_sort_by, which also blocks the open PRs (#4, #5) since they inherit the failure from the base branch.

error: consider using `sort_by_key`
 --> src/github/graphql.rs:248
 --> src/ui/widgets.rs:286

Fix

Replace the manual reversing comparator closures with sort_by_key(|x| std::cmp::Reverse(...)) as clippy suggests.

Verified with cargo clippy --all-targets --all-features (clean).

…ort_by

Rust 1.96's clippy flags manual comparator closures that just reverse
a key. Use sort_by_key(|x| Reverse(...)) instead.
@zombocoder zombocoder merged commit 6974821 into main Jul 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant