Bump **CI** Clippy and rustfmt toolchain to Rust 1.96#1595
Merged
Conversation
Update the CI build/lint Rust toolchain from 1.92 to 1.96 and fix the lint warnings exposed by newer Clippy versions.
Coverage Report for CI Build 26846532752Coverage decreased (-0.02%) to 94.711%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions3 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
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.
Split out from the discussion at #1589 (comment)
per IvanIsCoding's suggestion to keep toolchain bumps separate from that PR.
The CI build/lint job pinned the Clippy/rustfmt toolchain at Rust
1.92(
# TODO: unpin clippy). Runningwith newer toolchains surfaced lints that newer Clippy enforces. This PR bumps
the pin to
1.96(current stable) and fixes those lints.Changes
.github/workflows/main.yml— bump the build/lintdtolnay/rust-toolchainpin from
1.92to1.96(drops the stale# TODO: unpin clippy). Clippy stayspinned on purpose, so CI doesn't break unexpectedly when a new Rust release
adds lints; this just moves the pin forward to current stable.
rustworkx-core/src/planar/lr_planar.rs— collapse the nestedifinsidethe
DfsEvent::BackEdgearm into a match guard. Fixesclippy::collapsible_match(reported by Rust 1.95). Behavior-neutral.
rustworkx-core/src/{coloring,bipartite_coloring}.rs— drop a redundant&in three test-only
panic!("{:?}", &edge.id())calls. Fixesclippy::useless_borrows_in_formatting(reported by nightly Clippy).Validation
Reproduced the failures and confirmed the fixes across toolchains:
cargo +1.95 clippy --workspace --all-targets --all-features -- -D warnings(originally failed on
collapsible_match; now passes)cargo +1.96 clippy --workspace --all-targets --all-features -- -D warningscargo +nightly clippy --workspace --all-targets --all-features -- -D warnings(originally failed on
useless_borrows_in_formatting; now passes)cargo +1.96 clippy --workspace --all-targets -- -D warnings(matches CI)cargo +1.96 fmt --all -- --checkandcargo +nightly fmt --all -- --checkcargo +1.96 test -p rustworkx-core(all pass, incl. planar suite)