Skip to content

fix(ci): satisfy Rust 1.98 byte-chunk lint - #12

Merged
GiggleLiu merged 1 commit into
release/t4a-0.2.0from
codex/update-cubecl-complex-cast-pin
Aug 29, 2026
Merged

fix(ci): satisfy Rust 1.98 byte-chunk lint#12
GiggleLiu merged 1 commit into
release/t4a-0.2.0from
codex/update-cubecl-complex-cast-pin

Conversation

@GiggleLiu

@GiggleLiu GiggleLiu commented Aug 29, 2026

Copy link
Copy Markdown

Observation

cargo xtask check lint fails on Rust 1.98 in read_host_data for both F32 and I32 data:

error: use of `chunks_exact` with `try_into`
help: consider using `as_chunks`

CubeK runs Clippy with --deny warnings, so this warning blocks CI.

Root cause

Both decoding loops split a byte buffer into four-byte slices with chunks_exact(4), then convert each slice to [u8; 4] with try_into().unwrap().

The chunk size is known at compile time, and each buffer is allocated as elem_count * size_of::<T>() before read_exact fills it. There cannot be a remainder. Rust 1.98 Clippy therefore flags the fallible slice conversion and asks for as_chunks::<4>().

Fix

Use buf.as_chunks::<4>().0 and pass each [u8; 4] directly to from_le_bytes.

This preserves the decoding behavior, removes the unnecessary conversion and unwrap, and leaves the CubeCL dependency pin unchanged.

Validation

  • cargo fmt --all -- --check
  • cargo test -p t4a-cubek-test-utils --lib round_trip (3 passed)
  • cargo xtask check lint

@GiggleLiu GiggleLiu changed the title fix: align CubeCL compatibility pin fix(deps): align CubeCL revision with tenferro Aug 29, 2026
@GiggleLiu GiggleLiu changed the title fix(deps): align CubeCL revision with tenferro fix(ci): satisfy Rust 1.98 byte-chunk lint Aug 29, 2026
@GiggleLiu
GiggleLiu force-pushed the codex/update-cubecl-complex-cast-pin branch from 313bd26 to 68b4038 Compare August 29, 2026 15:51
@GiggleLiu
GiggleLiu force-pushed the codex/update-cubecl-complex-cast-pin branch from 68b4038 to d256d5a Compare August 29, 2026 15:51
@GiggleLiu
GiggleLiu merged commit 563bae3 into release/t4a-0.2.0 Aug 29, 2026
5 checks passed
@GiggleLiu
GiggleLiu deleted the codex/update-cubecl-complex-cast-pin branch August 31, 2026 11:32
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