Skip to content

module-lattice: annotate integer_division_remainder_used allows - #374

Open
vickyone0 wants to merge 2 commits into
RustCrypto:masterfrom
vickyone0:annotate-integer-division-allows
Open

module-lattice: annotate integer_division_remainder_used allows#374
vickyone0 wants to merge 2 commits into
RustCrypto:masterfrom
vickyone0:annotate-integer-division-allows

Conversation

@vickyone0

Copy link
Copy Markdown

Completes @tarcieri suggested pass from #25 — annotates the remaining allow(clippy::integer_division_remainder_used) sites with reason.

module-lattice/src/algebra.rs: BARRETT_MULTIPLIER is a const computed from Field::Q, so the division is const-evaluated and emits no runtime instruction — annotated reason = "constant".
module-lattice/tests/encode.rs (2 sites): annotated reason = "tests", matching the convention in the sibling test files.

All tests pass (including Wycheproof and ACVP vectors); cargo clippy --all-targets --all-features is clean on a fresh build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant