Skip to content

Commit bc71b6b

Browse files
committed
style(simd_avx2): apply nightly rustfmt to U8x32 additions (PR #144 fmt fix)
The format/nightly CI job on PR #144 flagged two sites in the U8x32 additions: 1. `nibble_popcount_lut` — 32-byte literal split into two 16-element rows for readability. Nightly rustfmt's chains_overflow_last_block + width budget collapse it to one line. Restored. 2. `permute_bytes_reverse` test — a 3-method chain was on one line. Nightly rustfmt wants each `.method()` on its own line under `chain_width = 60`. Restored. No semantic change. `cargo +nightly fmt --all --check` clean after.
1 parent 521d23f commit bc71b6b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/simd_avx2.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,8 +2004,7 @@ impl U8x32 {
20042004
pub fn nibble_popcount_lut() -> Self {
20052005
// Index i ∈ [0,15] → number of set bits in i.
20062006
Self::from_array([
2007-
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
2008-
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
2007+
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
20092008
])
20102009
}
20112010
}
@@ -2209,7 +2208,9 @@ mod u8x32_tests {
22092208
fn permute_bytes_reverse() {
22102209
let src: [u8; 32] = core::array::from_fn(|i| i as u8);
22112210
let idx: [u8; 32] = core::array::from_fn(|i| (31 - i) as u8);
2212-
let out = U8x32::from_array(src).permute_bytes(U8x32::from_array(idx)).to_array();
2211+
let out = U8x32::from_array(src)
2212+
.permute_bytes(U8x32::from_array(idx))
2213+
.to_array();
22132214
for i in 0..32 {
22142215
assert_eq!(out[i], src[31 - i]);
22152216
}

0 commit comments

Comments
 (0)