Skip to content

Bump **CI** Clippy and rustfmt toolchain to Rust 1.96#1595

Merged
IvanIsCoding merged 2 commits into
Qiskit:mainfrom
spital:bump-clippy-rustfmt-1.96
Jun 2, 2026
Merged

Bump **CI** Clippy and rustfmt toolchain to Rust 1.96#1595
IvanIsCoding merged 2 commits into
Qiskit:mainfrom
spital:bump-clippy-rustfmt-1.96

Conversation

@spital
Copy link
Copy Markdown
Contributor

@spital spital commented Jun 2, 2026

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). Running

cargo clippy --workspace --all-targets --all-features -- -D warnings

with 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/lint dtolnay/rust-toolchain
    pin from 1.92 to 1.96 (drops the stale # TODO: unpin clippy). Clippy stays
    pinned 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 nested if inside
    the DfsEvent::BackEdge arm into a match guard. Fixes clippy::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. Fixes
    clippy::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 warnings
  • cargo +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 -- --check and cargo +nightly fmt --all -- --check
  • cargo +1.96 test -p rustworkx-core (all pass, incl. planar suite)

Update the CI build/lint Rust toolchain from 1.92 to 1.96 and fix the
lint warnings exposed by newer Clippy versions.
Copy link
Copy Markdown
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@IvanIsCoding IvanIsCoding enabled auto-merge June 2, 2026 20:36
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 26846532752

Coverage decreased (-0.02%) to 94.711%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: 4 of 4 lines across 1 file are fully covered (100%).
  • 3 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

3 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
rustworkx-core/src/generators/random_graph.rs 3 86.73%

Coverage Stats

Coverage Status
Relevant Lines: 20213
Covered Lines: 19144
Line Coverage: 94.71%
Coverage Strength: 920199.24 hits per line

💛 - Coveralls

@IvanIsCoding IvanIsCoding added this pull request to the merge queue Jun 2, 2026
Merged via the queue into Qiskit:main with commit ddbac25 Jun 2, 2026
38 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.

3 participants