From c60fc426cc260c4183b71b76f2d6c62e5545e956 Mon Sep 17 00:00:00 2001 From: vickyone0 Date: Wed, 12 Aug 2026 15:31:52 +0530 Subject: [PATCH 1/2] module-lattice: annotate integer_division_remainder_used allows --- module-lattice/src/algebra.rs | 2 +- module-lattice/tests/encode.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module-lattice/src/algebra.rs b/module-lattice/src/algebra.rs index 113eb72b..c88c17ed 100644 --- a/module-lattice/src/algebra.rs +++ b/module-lattice/src/algebra.rs @@ -68,7 +68,7 @@ macro_rules! define_field { #[allow(clippy::as_conversions)] const BARRETT_SHIFT: usize = 2 * (Self::Q.ilog2() + 1) as usize; - #[allow(clippy::integer_division_remainder_used)] + #[allow(clippy::integer_division_remainder_used, reason = "constant")] const BARRETT_MULTIPLIER: Self::LongLong = (1 << Self::BARRETT_SHIFT) / Self::QLL; fn small_reduce(x: Self::Int) -> Self::Int { diff --git a/module-lattice/tests/encode.rs b/module-lattice/tests/encode.rs index bb1b61e0..86c36745 100644 --- a/module-lattice/tests/encode.rs +++ b/module-lattice/tests/encode.rs @@ -36,7 +36,7 @@ where D: ArraySize + Rem, Mod: Zero, { - #[allow(clippy::integer_division_remainder_used)] +#[allow(clippy::integer_division_remainder_used, reason = "tests")] fn repeat(&self) -> Array { Array::from_fn(|i| self[i % N::USIZE].clone()) } @@ -46,7 +46,7 @@ where // byte_encode / byte_decode tests // ======================================== -#[allow(clippy::integer_division_remainder_used)] +#[allow(clippy::integer_division_remainder_used, reason = "tests")] fn byte_codec_test(decoded: &DecodedValue, encoded: &EncodedPolynomial) where D: EncodingSize, From 548937b52f20cee8b6af73859fd5e6f3c8e99d06 Mon Sep 17 00:00:00 2001 From: vickyone0 Date: Wed, 12 Aug 2026 15:42:14 +0530 Subject: [PATCH 2/2] module-lattice: fix formatting --- module-lattice/tests/encode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module-lattice/tests/encode.rs b/module-lattice/tests/encode.rs index 86c36745..1e7d8e09 100644 --- a/module-lattice/tests/encode.rs +++ b/module-lattice/tests/encode.rs @@ -36,7 +36,7 @@ where D: ArraySize + Rem, Mod: Zero, { -#[allow(clippy::integer_division_remainder_used, reason = "tests")] + #[allow(clippy::integer_division_remainder_used, reason = "tests")] fn repeat(&self) -> Array { Array::from_fn(|i| self[i % N::USIZE].clone()) }