diff --git a/pairing/src/bls12_381/ec.rs b/pairing/src/bls12_381/ec.rs index b20dea8..fa659bd 100644 --- a/pairing/src/bls12_381/ec.rs +++ b/pairing/src/bls12_381/ec.rs @@ -955,7 +955,7 @@ pub mod g1 { let negyrepr = negy.into_repr(); let p = G1Affine { - x: x, + x, y: if yrepr < negyrepr { y } else { negy }, infinity: false, }; @@ -1637,7 +1637,7 @@ pub mod g2 { negy.negate(); let p = G2Affine { - x: x, + x, y: if y < negy { y } else { negy }, infinity: false, }; diff --git a/pairing/src/bls12_381/fq12.rs b/pairing/src/bls12_381/fq12.rs index f07a337..3c726d2 100644 --- a/pairing/src/bls12_381/fq12.rs +++ b/pairing/src/bls12_381/fq12.rs @@ -168,8 +168,8 @@ fn test_fq12_mul_by_014() { a.mul_by_014(&c0, &c1, &c5); b.mul_assign(&Fq12 { c0: Fq6 { - c0: c0, - c1: c1, + c0, + c1, c2: Fq2::zero(), }, c1: Fq6 { diff --git a/pairing/src/bls12_381/fq6.rs b/pairing/src/bls12_381/fq6.rs index 87e64cb..dbe58f7 100644 --- a/pairing/src/bls12_381/fq6.rs +++ b/pairing/src/bls12_381/fq6.rs @@ -343,7 +343,7 @@ fn test_fq6_mul_by_1() { a.mul_by_1(&c1); b.mul_assign(&Fq6 { c0: Fq2::zero(), - c1: c1, + c1, c2: Fq2::zero(), }); @@ -366,8 +366,8 @@ fn test_fq6_mul_by_01() { a.mul_by_01(&c0, &c1); b.mul_assign(&Fq6 { - c0: c0, - c1: c1, + c0, + c1, c2: Fq2::zero(), }); diff --git a/pairing/src/lib.rs b/pairing/src/lib.rs index 7edb180..a81d1a1 100644 --- a/pairing/src/lib.rs +++ b/pairing/src/lib.rs @@ -100,7 +100,7 @@ pub trait Engine: ScalarEngine { G2: Into, { Self::final_exponentiation(&Self::miller_loop( - [(&(p.into().prepare()), &(q.into().prepare()))].into_iter(), + [(&(p.into().prepare()), &(q.into().prepare()))].iter(), )).unwrap() } }