Fix clippy (#1662)

This commit is contained in:
Robin Salen 2025-01-30 15:14:13 -05:00 committed by GitHub
parent 753389a2ca
commit 1aa32519eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,7 @@ mod tests {
// "random", the last degree_padded-degree of them are zero. // "random", the last degree_padded-degree of them are zero.
let coeffs = (0..degree) let coeffs = (0..degree)
.map(|i| F::from_canonical_usize(i * 1337 % 100)) .map(|i| F::from_canonical_usize(i * 1337 % 100))
.chain(core::iter::repeat(F::ZERO).take(degree_padded - degree)) .chain(core::iter::repeat_n(F::ZERO, degree_padded - degree))
.collect::<Vec<_>>(); .collect::<Vec<_>>();
assert_eq!(coeffs.len(), degree_padded); assert_eq!(coeffs.len(), degree_padded);
let coefficients = PolynomialCoeffs { coeffs }; let coefficients = PolynomialCoeffs { coeffs };

View File

@ -160,7 +160,7 @@ macro_rules! test_prime_field_arithmetic {
fn subtraction_double_wraparound() { fn subtraction_double_wraparound() {
type F = $field; type F = $field;
let (a, b) = (F::from_canonical_u64((F::ORDER + 1u64) / 2u64), F::TWO); let (a, b) = (F::from_canonical_u64(F::ORDER.div_ceil(2u64)), F::TWO);
let x = a * b; let x = a * b;
assert_eq!(x, F::ONE); assert_eq!(x, F::ONE);
assert_eq!(F::ZERO - x, F::NEG_ONE); assert_eq!(F::ZERO - x, F::NEG_ONE);