Fix Clippy and minimal-versions CI failures on Rust 1.91 - #768
Open
inureyes wants to merge 1 commit into
Open
Conversation
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.
This was referenced Sep 4, 2026
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.
Description
ClippyandMinimal-versionshave been failing onmainsince 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_ifto nestedif let, which flags 40 sites.cargo clippy --fixrewrites 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 inlib.rsrather than reformatting them now.Under minimal versions,
yasna'snum-bigint = "0.4"resolves to 0.4.0, whosebits().div_ceil(&u64::from(bits))now picks the inherentu64::div_ceiloverInteger::div_ceiland 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 asyasna, the same waycipher,ghash,polyvalanduniversal-hashare already pinned in this file.Verified with the CI commands:
cargo clippywith and without--all-features,cargo minimal-versions check --all-features --no-dev-deps,cargo fmt --check,cargo test --all-features, plus the 1.89.0wasm32-wasip1build and an MSRV check.AI Usage
Choose the level of AI involvement for this PR.
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).