Repository navigation
chore(clippy): clear chunks_exact_to_as_chunks in niubash-runtime (#450 parallel batch) - #485
Conversation
CR(本轮不合并)logo.rs 的 lint 本体全部达标(见下),但 Cargo.lock 那个 hunk 是反的,正是本 PR CI 全红的直接原因(7 个 job 全部 机制PR 描述的前提「current rubash master no longer depends on sha2」方向反了:当前 rubash master 恰恰新加了
本地为什么会看着没事(坑位留档):本地若 修法删掉 Cargo.lock hunk,只留 logo.rs,push 即可。lint 实质本轮已按 #469/#476 同口径验全(rustc 1.99.0 stable,
删 hunk 后 CI 预期只剩 master 既有的 |
… parallel batch) Replace buf.chunks_exact(N) with buf.as_chunks::<N>().0.iter() in the logo pixel decoders; identical full-chunk semantics, remainder still dropped. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
99a476a to
273841c
Compare
|
按评审意见返工(对应评论 6305878150):
Generated with Devin |
终审:通过,合并Cargo.lock hunk 去除后的返工验收四项全过(head
CI: |
Summary
Parallel batch per #450: clears one lint category in
niubash-runtime.clippy::chunks_exact_to_as_chunkscrates/niubash-runtime/src/logo.rs(render_logo/render_logo_to_stringpixel decoders):buf.chunks_exact(N)→buf.as_chunks::<N>().0.iter(). Identical semantics —as_chunks().0yields exactly the full chunks and drops the remainder, same aschunks_exact.Cargo.lock: current rubash master no longer depends onsha2, and the stale lock made--lockedbuilds fail.Sibling batches: #469 (
needless_borrow), #476 (cloned_ref_to_slice_refs) — untouched here.Counts
Basis: rustc 1.99.0 stable,
cargo clippy -p niubash-runtime --all-targets(JSON diagnostics, same counting method as the tracking total).clippy::chunks_exact_to_as_chunksTest plan
cargo clippy -p niubash-runtime --all-targets— category 12 → 0, total 163 → 151, no new warningscargo fmt --check -p niubash-runtime— cleancargo test -p niubash-runtime --lib --locked— 567 passed, 0 failedRefs #450
Generated with Devin