chore(lint): fix clippy 1.98 pedantic lints breaking every PR - #236
Merged
Conversation
Stable clippy 1.98 adds chunks_exact_to_as_chunks and manual_midpoint, both pedantic, both firing on existing code. CI runs clippy with -D warnings, so every PR opened today fails on unrelated files. - simd_scan::find_stop: as_chunks::<16>() instead of chunks_exact(16) plus try_into().unwrap(); the remainder now comes from the same destructuring. - bam_dedup: as_chunks::<2>() for the (mate1, mate2) pairing. - quant: usize::midpoint for the segment-tree split point. Behaviour is unchanged: as_chunks yields the same chunks and remainder as chunks_exact, and midpoint equals (a + b) >> 1 for the non-overflowing indices here. MSRV 1.89 covers as_chunks (1.88) and usize::midpoint (1.85). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Why
mainis red under the CI toolchain. Stable clippy 1.98 adds two pedantic lints that fire on existing code, and CI runscargo clippy --all-targets -- -D warnings, so every PR opened today fails on files it never touched (seen on #235, a config-only change).Note for anyone who checked locally and saw nothing: cargo does not replay diagnostics for crates that are already fresh in the cache, so a warm-cache
cargo clippymisses these.touch src/lib.rsfirst to reproduce.What
simd_scan::find_stop:as_chunks::<16>()replaceschunks_exact(16)plus the twotry_into().unwrap()casts; the tail comes from the same destructuring instead of.remainder().bam_dedup:as_chunks::<2>()for the (mate1, mate2) pairing.quant:usize::midpointfor the segment-tree split point.Behaviour is identical:
as_chunksyields the same chunks and remainder aschunks_exact, andmidpointequals(a + b) >> 1for the non-overflowing indices here. TheunsafeSIMD surface is untouched, andchunk_all_matchnow receives&[u8; 16]directly rather than through a checked cast.MSRV 1.89 covers both APIs (
as_chunks1.88,usize::midpoint1.85).Verification
cargo clippy --all-targets -- -D warningsclean,cargo fmt --checkclean,cargo testgreen (10 suites, 0 failures).🤖 Generated with Claude Code