Skip to content

Fix Clippy and minimal-versions CI failures on Rust 1.91 - #768

Open
inureyes wants to merge 1 commit into
Eugeny:mainfrom
inureyes:chore/rust-1.91-ci
Open

Fix Clippy and minimal-versions CI failures on Rust 1.91#768
inureyes wants to merge 1 commit into
Eugeny:mainfrom
inureyes:chore/rust-1.91-ci

Conversation

@inureyes

@inureyes inureyes commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Clippy and Minimal-versions have been failing on main since the 1.91 toolchain reached the runners, independently of any pull request: https://github.com/Eugeny/russh/actions/runs/33791529793 at 8a51a0d.

Clippy 1.91 extended collapsible_if to nested if let, which flags 40 sites. cargo clippy --fix rewrites them as let-chains, but neither stable rustfmt nor nightly 1.10.0 reformats the result, so every body keeps its pre-collapse indentation until it is fixed by hand. That churn lands in the session and encrypted modules that most open PRs touch, so this allows the lint next to the two allows already in lib.rs rather than reformatting them now.

Under minimal versions, yasna's num-bigint = "0.4" resolves to 0.4.0, whose bits().div_ceil(&u64::from(bits)) now picks the inherent u64::div_ceil over Integer::div_ceil and fails to compile. 0.4.6 switched those three call sites to UFCS, so the floor is raised with a renamed optional dependency tied to the same feature as yasna, the same way cipher, ghash, polyval and universal-hash are already pinned in this file.

Verified with the CI commands: cargo clippy with and without --all-features, cargo minimal-versions check --all-features --no-dev-deps, cargo fmt --check, cargo test --all-features, plus the 1.89.0 wasm32-wasip1 build and an MSRV check.

AI Usage

Choose the level of AI involvement for this PR.

  • Fully vibe coded
  • AI-designed, AI-coded, manually checked
  • Human-designed, AI-coded
  • Human-designed, human-coded (includes AI autocompletions and boilerplate gen)

This is not to block AI contributions but rather to speed up PR review (saves time on trying to deduce the logic behind AI hallucinations).

Both jobs have been red on `main` since the 1.91 toolchain reached the runners, independently of any pull request.

Clippy 1.91 extended `collapsible_if` to nested `if let`, which flags 40 sites. `cargo clippy --fix` rewrites them as let-chains, but neither stable rustfmt nor nightly 1.10.0 reformats the result, so the bodies keep their pre-collapse indentation until each site is fixed by hand. That churn lands in the session and encrypted modules that most open PRs touch, so allow the lint for now next to the two allows already in `lib.rs`.

Under minimal versions, `yasna`'s `num-bigint = "0.4"` resolves to 0.4.0, whose `bits().div_ceil(&u64::from(bits))` now picks the inherent `u64::div_ceil` over `Integer::div_ceil` and fails to compile. 0.4.6 switched those three call sites to UFCS, so raise the floor with a renamed optional dependency, the same way `cipher`, `ghash`, `polyval` and `universal-hash` are already pinned in this file.

Verified with the CI commands: `cargo clippy` with and without `--all-features`, `cargo minimal-versions check --all-features --no-dev-deps`, `cargo fmt --check`, `cargo test --all-features`, plus the 1.89.0 `wasm32-wasip1` build and an MSRV check.
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