mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-04 06:43: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.
|
// "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 };
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user