Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
use into
Browse files Browse the repository at this point in the history
  • Loading branch information
Achim Schneider committed Mar 18, 2023
1 parent c6a7609 commit 344cfff
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions primitives/arkworks/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ pub fn multi_miller_loop_generic<Curve: Pairing>(
let g1: Vec<_> = a_vec
.chunks(<Curve as Pairing>::G1Affine::generator().serialized_size(Compress::No))
.into_iter()
.map(|elem| deserialize_argument::<<Curve as Pairing>::G1Affine>(elem))
.map(|elem| deserialize_argument::<<Curve as Pairing>::G1Affine>(elem.into()))
.collect();
let g2: Vec<_> = b_vec
.chunks(<Curve as Pairing>::G2Affine::generator().serialized_size(Compress::No))
.into_iter()
.map(|elem| deserialize_argument::<<Curve as Pairing>::G2Affine>(elem))
.map(|elem| deserialize_argument::<<Curve as Pairing>::G2Affine>(elem.into()))
.collect();

let result = Curve::multi_miller_loop(g1, g2);
Expand All @@ -56,12 +56,12 @@ pub fn msm_g1_generic<Curve: Pairing>(bases: Vec<u8>, scalars: Vec<u8>) -> Vec<u
let bases: Vec<_> = bases
.chunks(<Curve as Pairing>::G1Affine::generator().serialized_size(Compress::No))
.into_iter()
.map(|a| deserialize_argument::<<Curve as Pairing>::G1Affine>(a))
.map(|a| deserialize_argument::<<Curve as Pairing>::G1Affine>(a.into()))
.collect();
let scalars: Vec<_> = scalars
.chunks(Curve::ScalarField::zero().serialized_size(Compress::No))
.into_iter()
.map(|a| deserialize_argument::<Curve::ScalarField>(a))
.map(|a| deserialize_argument::<Curve::ScalarField>(a.into()))
.collect();

let result =
Expand All @@ -74,12 +74,12 @@ pub fn msm_g2_generic<Curve: Pairing>(bases: Vec<u8>, scalars: Vec<u8>) -> Vec<u
let bases: Vec<_> = bases
.chunks(<Curve as Pairing>::G2Affine::generator().serialized_size(Compress::No))
.into_iter()
.map(|a| deserialize_argument::<<Curve as Pairing>::G2Affine>(a))
.map(|a| deserialize_argument::<<Curve as Pairing>::G2Affine>(a.into()))
.collect();
let scalars: Vec<_> = scalars
.chunks(Curve::ScalarField::zero().serialized_size(Compress::No))
.into_iter()
.map(|a| deserialize_argument::<Curve::ScalarField>(a))
.map(|a| deserialize_argument::<Curve::ScalarField>(a.into()))
.collect();

let result =
Expand Down

0 comments on commit 344cfff

Please sign in to comment.