fix(protocol): satisfy clippy 1.98 chunks_exact lint - #485
Merged
Conversation
Rust 1.98 clippy denies chunks_exact with a constant chunk size (clippy::chunks_exact_to_as_chunks), failing the workspace gate on every PR. as_chunks::<2>() is stable since 1.88, matching the workspace MSRV, and drops the runtime chunk-size argument for a compile-time one. Signed-off-by: wchwawa <wch19961116@gmail.com>
The first workspace pass stopped at nokv-protocol; once it compiled, CI surfaced the same chunks_exact lint in nokv-agent projection hex decode and nokv-meta gc digest parsing, plus a needless_late_init on the gc deletions binding. Same treatment: as_chunks::<2>() (stable at the 1.88 MSRV) and binding deletions directly from the if expression. Verified locally: cargo clippy --workspace --all-targets -D warnings clean; nokv-agent and nokv-meta test suites pass (365+56+20+2). Signed-off-by: wchwawa <wch19961116@gmail.com>
Member
Author
|
Pushed a second commit: the first CI pass stopped at |
CI reveals the 1.98 lint one crate at a time as compilation stops at the first failing crate; a repository-wide sweep replaces the hex decode pattern in nokv (connection, cli), nokv-python, nokv-server (recovery publisher and installer), nokv-meta recovery test fixture, and the bench restore driver, so the workspace gate cannot keep failing serially. No behavior change; all affected crate suites pass (679 tests). Signed-off-by: wchwawa <wch19961116@gmail.com>
Open
12 tasks
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.
CI's stable toolchain moved to Rust 1.98, whose clippy denies
chunks_exactwith a constant chunk size (clippy::chunks_exact_to_as_chunks). This fails thenokv-workspacegate on every open PR (first observed on #484, which touches only workflow files).Fix: iterate
as_chunks::<2>().0inparse_digest_uri.slice::as_chunksis stable since Rust 1.88, exactly the workspace MSRV, so no MSRV movement.Verified locally:
cargo clippy -p nokv-protocol --all-targets -- -D warningsclean, 63/63 crate tests pass.