Skip to content

Commit

Permalink
Fixing clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersSteenNilsen committed Jun 15, 2024
1 parent ebcf8f2 commit 7466cfb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions multimixer-128/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl MultimixerCore {

for i in 0..4 {
x[i] = u32::from_ne_bytes([
message_block[0 + i * 4],
message_block[i * 4],
message_block[1 + i * 4],
message_block[2 + i * 4],
message_block[3 + i * 4],
Expand Down Expand Up @@ -105,9 +105,12 @@ impl MultimixerCore {
p[3] as u64 * q[3] as u64,
];

for i in 0..self.block_sums.len() {
self.block_sums[i] = self.block_sums[i].wrapping_add(block_res[i]);
}
self.block_sums
.iter_mut()
.zip(block_res.iter())
.for_each(|(sum, &res)| {
*sum = sum.wrapping_add(res);
});

self.block_index += 1;
}
Expand Down

0 comments on commit 7466cfb

Please sign in to comment.