Skip to content

fix(api): satisfy clippy 1.96 unnecessary_sort_by (unblock main)#63

Merged
thejefflarson merged 1 commit into
mainfrom
fix-clippy-1.96
Jun 24, 2026
Merged

fix(api): satisfy clippy 1.96 unnecessary_sort_by (unblock main)#63
thejefflarson merged 1 commit into
mainfrom
fix-clippy-1.96

Conversation

@thejefflarson

Copy link
Copy Markdown
Owner

Main's server job went red the moment clippy landed (#61): rust-toolchain@stable is now 1.96, whose unnecessary_sort_by lint flags two descending sort_by(|a,b| b.points.len().cmp(&a.points.len())) calls in api.rs that my local 1.94 clippy didn't have. Because image needs server, the JEF-87 image build was skipped entirely.

Fix: both sites → sort_by_key(|b| std::cmp::Reverse(b.points.len())) (clippy's own suggestion; identical stable ordering). Verified clean locally after rustup update stable to 1.96: cargo clippy --locked --all-targets -- -D warnings → EXIT 0, cargo fmt --check clean.

🤖 Generated with Claude Code

The new clippy step runs under rust-toolchain@stable, which is now 1.96; its
unnecessary_sort_by lint flagged two descending `sort_by(|a,b| b.len.cmp(&a.len))`
calls that my local 1.94 clippy didn't have. Switch both to the suggested
`sort_by_key(|b| Reverse(b.points.len()))` — identical (stable) ordering. Verified
clean with clippy 1.96. Fixes the red server job that's blocking the image build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@thejefflarson thejefflarson merged commit f1fd57e into main Jun 24, 2026
2 checks passed
@thejefflarson thejefflarson deleted the fix-clippy-1.96 branch June 24, 2026 04:41
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