Skip to content

fix: satisfy clippy on current stable - #18

Merged
Harsh-2002 merged 1 commit into
mainfrom
fix/clippy-chunks-exact
Aug 31, 2026
Merged

fix: satisfy clippy on current stable#18
Harsh-2002 merged 1 commit into
mainfrom
fix/clippy-chunks-exact

Conversation

@Harsh-2002

Copy link
Copy Markdown
Owner

The clippy job has been failing on every push since #11, and I missed it — I was reading the tail of gh pr checks, which showed passing rows and cut off the failure.

error: using `chunks_exact` with a constant chunk size
   --> src/export.rs:455

sfnt_checksum (added with font subsetting in #11) used chunks_exact(4) plus try_into().unwrap(). Current clippy wants as_chunks::<4>(), which also removes the unwrap.

Why it wasn't caught locally

CI pins dtolnay/rust-toolchain@stable; this machine was on 1.97.1 (July), where the lint does not exist. Local gate green, CI red.

Fixed by installing a matching toolchain — /usr/local/rustup is root-owned, so it needed RUSTUP_HOME pointed at writable space, the same problem CARGO_HOME had. Now on 1.98.0, and cargo clippy --features serve -- -D warnings exits 0.

What was actually affected

Only the lint gate. fmt and all three test jobs passed throughout, and release.yml runs neither clippy nor tests — it builds and packages — so the published v1.4.0 and v1.5.0 binaries are unaffected and correct. Nothing needs republishing.

Affected merges: #11, #12, #13, #14, #15, #16, #17.

Gate re-run on 1.98.0: fmt, clippy, 324 tests all green.

sfnt_checksum used chunks_exact(4) with try_into().unwrap(). Newer clippy
rejects a constant chunk size in favour of as_chunks, which also drops the
unwrap.

CI pins dtolnay/rust-toolchain@stable while this machine was on 1.97.1, so
the lint did not exist locally and the clippy job had been failing on every
push since the subsetting work landed. Verified against 1.98.0.
@Harsh-2002
Harsh-2002 merged commit 7ce8ef5 into main Aug 31, 2026
10 checks passed
@Harsh-2002
Harsh-2002 deleted the fix/clippy-chunks-exact branch August 31, 2026 13:29
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.

1 participant