fix(lints): satisfy the new Rust 1.98 clippy lints - #128
Merged
Conversation
GitHub's runners moved to rustc 1.98.1 and CI runs clippy with `-D warnings`, so four lints new in 1.98 now fail every job on master — unrelated to any pending change. Verified pre-existing by running clippy against clean HEAD. - `chunks_exact_to_as_chunks` in checksum.rs (CRC-32 slice-by-8) and zstd/xxhash.rs (32-byte stripes): switch to `as_chunks::<N>()`, which returns the fixed-size chunks and the remainder as a pair. Stable since 1.88, which is this crate's MSRV — verified with a 1.88 build. - `manual_slice_fill` in rar5's reset: `window.fill(0)`. - `needless_late_init` in the rangecoder tree decode: bind `bit` from the `if`/`else` directly. All four are mechanical; no behaviour change. The two checksum inner loops are the ones worth being careful about, so beyond the full suite they are covered by the CRC-32 catalogue vectors, the chunked-vs-one-shot equality test, and the gzip/zstd round-trips that exercise CRC-32 and xxhash end to end. `cargo test --all-features`: 1766 pass, 0 fail. Clippy clean under `--all-features` and both narrow subsets CI checks (`lz4`-only, `zstd`-only).
Merged
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.
GitHub's runners moved to rustc 1.98.1 and CI runs clippy with
-D warnings, so four lints new in 1.98 now failTest & linton all three OSes plusClippy on a narrow feature subset— on master, unrelated to any pending change. Confirmed pre-existing by running clippy against clean HEAD; #127 hit them and is blocked behind this.chunks_exact_to_as_chunkssrc/checksum.rs(CRC-32 slice-by-8)as_chunks::<8>()chunks_exact_to_as_chunkssrc/zstd/xxhash.rs(32-byte stripes)as_chunks::<32>()manual_slice_fillsrc/rar5/decoder.rsresetwindow.fill(0)needless_late_initsrc/rangecoder/mod.rstree decodebitfrom theif/elseas_chunksreturns the fixed-size chunks and the remainder as a pair, replacing the iterator plus.remainder(). It is stable since 1.88, which is exactly this crate'srust-version, so the MSRV floor is unchanged — verified with acargo +1.88 build --all-features.All four are mechanical with no behaviour change. The two checksum inner loops are the ones worth care, so beyond the full suite they are covered by the CRC-32 catalogue vectors (
0xCBF43926), the chunked-vs-one-shot equality test, and the gzip/zstd round-trips that drive CRC-32 and xxhash end to end.cargo test --all-features: 1766 pass, 0 fail. Clippy clean under--all-featuresand both narrow-subset commands CI runs (--features lz4,--features zstd).fmtclean.Worth considering separately: nothing pins the toolchain, so
dtolnay/rust-toolchain@stablewill keep importing new lints the day they ship. A pinned toolchain (or a scheduled canary job) would turn that into a deliberate upgrade rather than a surprise red master.