mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-02 13:53:07 +00:00
Fix clippy (#1662)
This commit is contained in:
parent
753389a2ca
commit
1aa32519eb
@ -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 };
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user