File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ mod tests {
222
222
// "random", the last degree_padded-degree of them are zero.
223
223
let coeffs = ( 0 ..degree)
224
224
. 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) )
226
226
. collect :: < Vec < _ > > ( ) ;
227
227
assert_eq ! ( coeffs. len( ) , degree_padded) ;
228
228
let coefficients = PolynomialCoeffs { coeffs } ;
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ macro_rules! test_prime_field_arithmetic {
160
160
fn subtraction_double_wraparound( ) {
161
161
type F = $field;
162
162
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 ) ;
164
164
let x = a * b;
165
165
assert_eq!( x, F :: ONE ) ;
166
166
assert_eq!( F :: ZERO - x, F :: NEG_ONE ) ;
You can’t perform that action at this time.
0 commit comments