From 38e99f8e7f4cd76d3633eae7b955e2d874731c6b Mon Sep 17 00:00:00 2001 From: rustaceanrob Date: Wed, 13 Mar 2024 10:51:01 -1000 Subject: [PATCH] Fix: clippy --- src/poly1305.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/poly1305.rs b/src/poly1305.rs index f99ee51..57f8b36 100644 --- a/src/poly1305.rs +++ b/src/poly1305.rs @@ -104,14 +104,14 @@ impl Poly1305 { // described well in an article here: https://loup-vaillant.fr/tutorials/poly1305-design let mut t = [0; 5]; for i in 0..5 { - for j in 0..5 { + for (j, t) in t.iter_mut().enumerate() { let modulus: u64 = if i > j { 5 } else { 1 }; let start = (5 - i) % 5; - t[j] += modulus * self.r[i] as u64 * self.acc[(start + j) % 5] as u64; + *t += modulus * self.r[i] as u64 * self.acc[(start + j) % 5] as u64; } } // carry