Fix clippy lints

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
str4d 2021-06-05 13:18:14 +01:00 committed by GitHub
parent 9f27049c84
commit 243f862617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -237,7 +237,7 @@ fn test_zs_and_us<C: CurveAffine>(base: C, z: &[u64], u: &[[[u8; 32]; H]], num_w
for ((u, z), window_points) in u.iter().zip(z.iter()).zip(window_table) {
for (u, point) in u.iter().zip(window_points.iter()) {
let y = *point.coordinates().unwrap().y();
let u = C::Base::from_bytes(&u).unwrap();
let u = C::Base::from_bytes(u).unwrap();
assert_eq!(C::Base::from_u64(*z) + y, u * u); // allow either square root
assert!(bool::from((C::Base::from_u64(*z) - y).sqrt().is_none()));
}

View File

@ -171,7 +171,7 @@ impl<F: FieldExt> From<&[[u8; 32]; H]> for WindowUs<F> {
Self(
window_us
.iter()
.map(|u| F::from_bytes(&u).unwrap())
.map(|u| F::from_bytes(u).unwrap())
.collect::<Vec<_>>()
.into_boxed_slice()
.try_into()