Migrate constant-size chunks_exact to as_chunks for the Rust 1.98 clippy lint - #565
Open
ciaranra wants to merge 5 commits into
Open
Migrate constant-size chunks_exact to as_chunks for the Rust 1.98 clippy lint#565ciaranra wants to merge 5 commits into
ciaranra wants to merge 5 commits into
Conversation
… 1.98 aarch64-darwin segfault is fixed (issue #566)
…stable stops segfaulting
…1.98 crash is nondeterministic
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.
Rust 1.98 reached CI (which floats latest stable) and its new
clippy::chunks_exact_to_as_chunkslint failsrust-linton every open PR against pre-existing code. This migrates all 91 constant-sizechunks_exactcall sites across 20 files toas_chunks, mostly viacargo clippy --fixplus four manual sites inpecos-rslib(where the array chunks also simplifyfrom_le_bytesconversions by removing intermediate buffer copies).No behavior change:
as_chunks::<N>().0yields exactly the complete chunks thatchunks_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 includingpecoswith--no-default-features),cargo fmt --all -- --checkclean, and lib tests pass for the touched crates (pecos-engines, pecos-simulators, pecos-qec, pecos-foreign, pecos-neo). Thepecos-rslibtest 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.