Skip to content

Commit 31e959d

Browse files
committed
cryprot-core: Fix clippy errors
1 parent a9559ea commit 31e959d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cryprot-core/src/transpose/avx2.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ pub fn avx_transpose128x128(in_out: &mut [__m256i; 64]) {
115115
// of 256 bit elements. In the first iteration we swap the 2x2 matrices that
116116
// are at positions in_out[i] and in_out[j], so the offset is 1. For 4x4 matrices
117117
// the offset is 2
118+
#[allow(clippy::eq_op)] // false positive due to use of seq!
118119
const OFFSET~N: usize = 1 << (N - 1);
119120

120121
for chunk in in_out.chunks_exact_mut(2 * OFFSET~N) {
@@ -282,6 +283,7 @@ pub fn transpose_bitmatrix(input: &[u8], output: &mut [u8], rows: usize) {
282283
// Inline never to reduce code size of main method.
283284
#[inline(never)]
284285
#[target_feature(enable = "avx2")]
286+
#[allow(clippy::too_many_arguments)]
285287
fn handle_rest_cols(
286288
input: &[u8],
287289
output: &mut [u8],
@@ -303,7 +305,7 @@ fn handle_rest_cols(
303305
// we use 16 because we still transpose a 128x128 matrix, of which only a part
304306
// is filled
305307
let buf_offset = k * 16;
306-
buf_as_bytes[buf_offset..buf_offset + remaining_cols_bytes].copy_from_slice(&src_slice);
308+
buf_as_bytes[buf_offset..buf_offset + remaining_cols_bytes].copy_from_slice(src_slice);
307309
}
308310

309311
avx_transpose128x128((&mut buf[..64]).try_into().expect("slice has length 64"));

0 commit comments

Comments
 (0)