Skip to content

Migrate constant-size chunks_exact to as_chunks for the Rust 1.98 clippy lint - #565

Open
ciaranra wants to merge 5 commits into
devfrom
fix-chunks-exact-lint
Open

Migrate constant-size chunks_exact to as_chunks for the Rust 1.98 clippy lint#565
ciaranra wants to merge 5 commits into
devfrom
fix-chunks-exact-lint

Conversation

@ciaranra

Copy link
Copy Markdown
Member

Rust 1.98 reached CI (which floats latest stable) and its new clippy::chunks_exact_to_as_chunks lint fails rust-lint on every open PR against pre-existing code. This migrates all 91 constant-size chunks_exact call sites across 20 files to as_chunks, mostly via cargo clippy --fix plus four manual sites in pecos-rslib (where the array chunks also simplify from_le_bytes conversions by removing intermediate buffer copies).

No behavior change: as_chunks::<N>().0 yields exactly the complete chunks that chunks_exact(N) yielded, as arrays instead of slices.

Verification: both CI clippy lanes reproduced locally on Rust 1.98.0 (--workspace --all-targets --all-features -- -D warnings, and the per-crate no-LLVM lane including pecos with --no-default-features), cargo fmt --all -- --check clean, and lib tests pass for the touched crates (pecos-engines, pecos-simulators, pecos-qec, pecos-foreign, pecos-neo). The pecos-rslib test binary does not link in this local environment (missing libpython at link time, unrelated to this change); its code compiles clean under clippy and CI will run its tests.

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