Skip to content

Commit

Permalink
Fix clippy (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare authored Jan 30, 2025
1 parent 753389a commit 1aa3251
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion field/src/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ mod tests {
// "random", the last degree_padded-degree of them are zero.
let coeffs = (0..degree)
.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<_>>();
assert_eq!(coeffs.len(), degree_padded);
let coefficients = PolynomialCoeffs { coeffs };
Expand Down
2 changes: 1 addition & 1 deletion field/src/prime_field_testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ macro_rules! test_prime_field_arithmetic {
fn subtraction_double_wraparound() {
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;
assert_eq!(x, F::ONE);
assert_eq!(F::ZERO - x, F::NEG_ONE);
Expand Down

0 comments on commit 1aa3251

Please sign in to comment.