Skip to content

Commit 1aa3251

Browse files
authored
Fix clippy (#1662)
1 parent 753389a commit 1aa3251

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

field/src/fft.rs

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

field/src/prime_field_testing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ macro_rules! test_prime_field_arithmetic {
160160
fn subtraction_double_wraparound() {
161161
type F = $field;
162162

163-
let (a, b) = (F::from_canonical_u64((F::ORDER + 1u64) / 2u64), F::TWO);
163+
let (a, b) = (F::from_canonical_u64(F::ORDER.div_ceil(2u64)), F::TWO);
164164
let x = a * b;
165165
assert_eq!(x, F::ONE);
166166
assert_eq!(F::ZERO - x, F::NEG_ONE);

0 commit comments

Comments
 (0)