Upgrade Rust toolchain to 1.95 and fix clippy lints#1259
Upgrade Rust toolchain to 1.95 and fix clippy lints#1259harsha-simhadri wants to merge 1 commit into
Conversation
Bump the pinned toolchain from 1.92 to 1.95 and resolve the clippy warnings that surface under 1.95 (all CI clippy jobs run with -Dwarnings): - useless_conversion: drop redundant .into_iter() calls in the benchmark, disk, and wide test helpers. - collapsible_match: fold the nested trained-check into a match guard in the Garnet provider's train_quantizer. - manual_checked_ops: allow the false positive in DiskSectorGraph::node_sector_index, where the else branch is genuine multi-sector layout logic rather than a divide-by-zero guard. Also refresh the toolchain reference in agents.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c751fafd-79be-47e2-9f20-7f1934f4d6e7
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s pinned Rust toolchain from 1.92 to 1.95 and applies small, targeted code changes to eliminate clippy warnings that become hard CI failures under -Dwarnings.
Changes:
- Bump
rust-toolchain.tomlchannel to Rust 1.95. - Remove a handful of redundant
.into_iter()calls to satisfyuseless_conversion/ related clippy warnings. - Add a narrowly scoped clippy allow + rationale for
clippy::manual_checked_opsinDiskSectorGraph::node_sector_index.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rust-toolchain.toml | Pins the workspace toolchain to Rust 1.95. |
| diskann-wide/src/test_utils/dot_product.rs | Removes redundant iterator conversions in test dot-product computations. |
| diskann-garnet/src/provider.rs | Simplifies quantizer selection logic using a match guard to satisfy clippy. |
| diskann-disk/src/search/provider/disk_sector_graph.rs | Adds an allow + explanation for a clippy lint where checked_div is not semantically appropriate. |
| diskann-disk/src/search/provider/disk_provider.rs | Removes redundant .into_iter() calls in a zipped result assembly loop. |
| diskann-benchmark/src/index/search/range.rs | Passes Vec<Run<_>> directly into an API expecting IntoIterator. |
| diskann-benchmark/src/index/search/knn.rs | Same as above for KNN search variants. |
| diskann-benchmark-runner/src/internal/regression.rs | Removes redundant .into_iter() on a Vec used in zip. |
| agents.md | Updates the documented “Last Updated” toolchain reference to Rust 1.95. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
CI failure is because of the compile tests in diskann-quantization. I've audited the results and it's fine. Running should fix the issue. Regarding the update - we should eventually have a policy regarding minimum Rust version. Current stable - 2 (so in this case, 1.95) is a decent policy. It allows our users some slack while still allowing us to (eventually) get shiny new features. |
Summary
Bumps the pinned Rust toolchain from 1.92 → 1.95 and fixes the clippy warnings that surface under 1.95. All CI clippy jobs run with
-Dwarnings, so each warning is a hard failure.Changes
rust-toolchain.toml:channel = "1.92"→"1.95". CI reads the channel viarustup show, so no workflow edits are needed.useless_conversion: removed redundant.into_iter()calls indiskann-benchmark-runner,diskann-benchmark,diskann-disk, anddiskann-widetest helpers (plus the follow-upunused_parens/ rustfmt reflow they triggered).collapsible_match: folded the nestedis_trained()check into a match guard inGarnetProvider::train_quantizer. Written asSome(q) if !q.is_trained() => q, _ => return falseto stay exhaustive (clippy's own--fixproduced a non-exhaustive match).manual_checked_ops: added a targeted#[allow]+ comment onDiskSectorGraph::node_sector_index. Theelsebranch is genuine multi-sector-per-node layout logic, not a divide-by-zero guard, sochecked_divwould be semantically wrong.agents.md: refreshed the toolchain reference to 1.95.Validation (local, under 1.95)
cargo clippywith-Dwarnings— default features, all features, and per-crate no-default-features: 0 warnings.cargo fmt --all --check: clean.--locked(Cargo.lock): unchanged.diskann-garnet40/40).Notes
The SDE baseline/AVX-512, codecov, and CodeQL gates aren't reproducible on Windows locally and are left to CI; the diff is lint-only, so risk is low.