Runs rustfmt on the repo

This commit is contained in:
François Garillot
2020-01-23 07:19:48 -08:00
committed by Pratyush Mishra
parent a3e1cd6cf2
commit b26867f267
19 changed files with 107 additions and 110 deletions

View File

@@ -6,9 +6,8 @@ use algebra::{
fp6_3over2::{Fp6, Fp6Parameters},
Fp2Parameters,
},
BitIterator, Field, PrimeField,
BitIterator, Field, One, PrimeField,
};
use algebra::One;
use std::{borrow::Borrow, marker::PhantomData};
use crate::{prelude::*, Assignment};
@@ -32,8 +31,8 @@ where
P: Fp12Parameters,
<P::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters<Fp = ConstraintF>,
{
pub c0: Fp6Gadget<P, ConstraintF>,
pub c1: Fp6Gadget<P, ConstraintF>,
pub c0: Fp6Gadget<P, ConstraintF>,
pub c1: Fp6Gadget<P, ConstraintF>,
#[derivative(Debug = "ignore")]
_params: PhantomData<P>,
}

View File

@@ -11,8 +11,8 @@ use crate::{fields::fp::FpGadget, prelude::*, Assignment};
#[derivative(Debug(bound = "P: Fp2Parameters, ConstraintF: PrimeField"))]
#[must_use]
pub struct Fp2Gadget<P: Fp2Parameters<Fp = ConstraintF>, ConstraintF: PrimeField> {
pub c0: FpGadget<ConstraintF>,
pub c1: FpGadget<ConstraintF>,
pub c0: FpGadget<ConstraintF>,
pub c1: FpGadget<ConstraintF>,
#[derivative(Debug = "ignore")]
_params: PhantomData<P>,
}
@@ -75,10 +75,7 @@ impl<P: Fp2Parameters<Fp = ConstraintF>, ConstraintF: PrimeField> FieldGadget<Fp
#[inline]
fn get_variable(&self) -> Self::Variable {
(
self.c0.get_variable(),
self.c1.get_variable(),
)
(self.c0.get_variable(), self.c1.get_variable())
}
#[inline]

View File

@@ -21,9 +21,9 @@ where
P: Fp6Parameters,
P::Fp2Params: Fp2Parameters<Fp = ConstraintF>,
{
pub c0: Fp2Gadget<P, ConstraintF>,
pub c1: Fp2Gadget<P, ConstraintF>,
pub c2: Fp2Gadget<P, ConstraintF>,
pub c0: Fp2Gadget<P, ConstraintF>,
pub c1: Fp2Gadget<P, ConstraintF>,
pub c2: Fp2Gadget<P, ConstraintF>,
#[derivative(Debug = "ignore")]
_params: PhantomData<P>,
}