Skip to content

fix(protocol): satisfy clippy 1.98 chunks_exact lint - #485

Merged
wchwawa merged 3 commits into
mainfrom
fix/clippy-198-as-chunks
Aug 23, 2026
Merged

fix(protocol): satisfy clippy 1.98 chunks_exact lint#485
wchwawa merged 3 commits into
mainfrom
fix/clippy-198-as-chunks

Conversation

@wchwawa

@wchwawa wchwawa commented Aug 23, 2026

Copy link
Copy Markdown
Member

CI's stable toolchain moved to Rust 1.98, whose clippy denies chunks_exact with a constant chunk size (clippy::chunks_exact_to_as_chunks). This fails the nokv-workspace gate on every open PR (first observed on #484, which touches only workflow files).

Fix: iterate as_chunks::<2>().0 in parse_digest_uri. slice::as_chunks is stable since Rust 1.88, exactly the workspace MSRV, so no MSRV movement.

Verified locally: cargo clippy -p nokv-protocol --all-targets -- -D warnings clean, 63/63 crate tests pass.

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>
@feichai0017 feichai0017 moved this to In Progress in NoKV Delivery Aug 23, 2026
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>
@wchwawa

wchwawa commented Aug 23, 2026

Copy link
Copy Markdown
Member Author

Pushed a second commit: the first CI pass stopped at nokv-protocol, and once that compiled the same 1.98 lint surfaced in nokv-agent (projection hex decode) and nokv-meta (gc digest parsing), plus one needless_late_init on the gc deletions binding. Full workspace clippy is now clean locally with -D warnings; nokv-agent/nokv-meta suites pass.

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>
@wchwawa
wchwawa merged commit d4310a5 into main Aug 23, 2026
8 checks passed
@wchwawa
wchwawa deleted the fix/clippy-198-as-chunks branch August 23, 2026 10:59
@github-project-automation github-project-automation Bot moved this from In Progress to Done in NoKV Delivery Aug 23, 2026
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.

2 participants