From 96f602e452a202cedd70432a2f302e328f2df7e7 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Thu, 12 Dec 2019 11:46:05 -0700 Subject: [PATCH] cargo fmt --- bls12_381/src/g1.rs | 3 ++- bls12_381/src/g2.rs | 3 ++- pairing/src/lib.rs | 16 ++++------------ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/bls12_381/src/g1.rs b/bls12_381/src/g1.rs index aa90dc1..e648e41 100644 --- a/bls12_381/src/g1.rs +++ b/bls12_381/src/g1.rs @@ -429,7 +429,8 @@ impl ConstantTimeEq for G1Projective { let other_is_zero = other.z.is_zero(); (self_is_zero & other_is_zero) // Both point at infinity - | ((!self_is_zero) & (!other_is_zero) & x1.ct_eq(&x2) & y1.ct_eq(&y2)) // Neither point at infinity, coordinates are the same + | ((!self_is_zero) & (!other_is_zero) & x1.ct_eq(&x2) & y1.ct_eq(&y2)) + // Neither point at infinity, coordinates are the same } } diff --git a/bls12_381/src/g2.rs b/bls12_381/src/g2.rs index 136cd03..e1596a1 100644 --- a/bls12_381/src/g2.rs +++ b/bls12_381/src/g2.rs @@ -501,7 +501,8 @@ impl ConstantTimeEq for G2Projective { let other_is_zero = other.z.is_zero(); (self_is_zero & other_is_zero) // Both point at infinity - | ((!self_is_zero) & (!other_is_zero) & x1.ct_eq(&x2) & y1.ct_eq(&y2)) // Neither point at infinity, coordinates are the same + | ((!self_is_zero) & (!other_is_zero) & x1.ct_eq(&x2) & y1.ct_eq(&y2)) + // Neither point at infinity, coordinates are the same } } diff --git a/pairing/src/lib.rs b/pairing/src/lib.rs index 89e5873..9afb427 100644 --- a/pairing/src/lib.rs +++ b/pairing/src/lib.rs @@ -28,12 +28,8 @@ use group::{CurveAffine, CurveProjective}; /// of prime order `r`, and are equipped with a bilinear pairing function. pub trait Engine: ScalarEngine { /// The projective representation of an element in G1. - type G1: CurveProjective< - Engine = Self, - Base = Self::Fq, - Scalar = Self::Fr, - Affine = Self::G1Affine, - > + From; + type G1: CurveProjective + + From; /// The affine representation of an element in G1. type G1Affine: PairingCurveAffine< @@ -46,12 +42,8 @@ pub trait Engine: ScalarEngine { > + From; /// The projective representation of an element in G2. - type G2: CurveProjective< - Engine = Self, - Base = Self::Fqe, - Scalar = Self::Fr, - Affine = Self::G2Affine, - > + From; + type G2: CurveProjective + + From; /// The affine representation of an element in G2. type G2Affine: PairingCurveAffine<