diff --git a/ec/src/models/short_weierstrass/group.rs b/ec/src/models/short_weierstrass/group.rs index 3e3bf9586..b58fb0061 100644 --- a/ec/src/models/short_weierstrass/group.rs +++ b/ec/src/models/short_weierstrass/group.rs @@ -636,11 +636,11 @@ impl ScalarMul for Projective

{ impl VariableBaseMSM for Projective

{ fn msm_bigint( - bases: &[Self::MulBase], - bigints: &[::BigInt], - ) -> Self { - P::msm_bigint(bases, bigints) - } + bases: &[Self::MulBase], + bigints: &[::BigInt], + ) -> Self { + P::msm_bigint(bases, bigints) + } } impl>> core::iter::Sum for Projective

{ diff --git a/ec/src/models/short_weierstrass/mod.rs b/ec/src/models/short_weierstrass/mod.rs index 8742bb950..b19dd93bf 100644 --- a/ec/src/models/short_weierstrass/mod.rs +++ b/ec/src/models/short_weierstrass/mod.rs @@ -6,7 +6,7 @@ use ark_std::io::{Read, Write}; use ark_ff::{fields::Field, PrimeField}; -use crate::{AffineRepr, Group, scalar_mul::variable_base::VariableBaseMSM}; +use crate::{scalar_mul::variable_base::VariableBaseMSM, AffineRepr, Group}; use num_traits::Zero; @@ -107,12 +107,11 @@ pub trait SWCurveConfig: super::CurveConfig { /// Default implementation for multi scalar multiplication fn msm_bigint( - bases: &[Affine], - bigints: &[::BigInt], - ) -> Projective - { - VariableBaseMSM::msm_bigint(bases, bigints) - } + bases: &[Affine], + bigints: &[::BigInt], + ) -> Projective { + VariableBaseMSM::msm_bigint(bases, bigints) + } /// If uncompressed, serializes both x and y coordinates as well as a bit for whether it is /// infinity. If compressed, serializes x coordinate with two bits to encode whether y is diff --git a/test-templates/src/msm.rs b/test-templates/src/msm.rs index 3c1a5a7cf..259b6376d 100644 --- a/test-templates/src/msm.rs +++ b/test-templates/src/msm.rs @@ -5,7 +5,6 @@ use ark_ec::{ use ark_ff::{PrimeField, UniformRand}; use ark_std::vec::Vec; - fn naive_var_base_msm(bases: &[G::MulBase], scalars: &[G::ScalarField]) -> G { let mut acc = G::zero();