Skip to content

Commit

Permalink
Remove needless .collect()s.
Browse files Browse the repository at this point in the history
  • Loading branch information
daira committed Jun 21, 2021
1 parent 2091449 commit 00ca9aa
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/plonk/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ pub fn create_proof<
.zip(instance.iter())
.map(|((permutations, advice), instance)| {
// Evaluate the h(X) polynomial's constraint system expressions for the permutation constraints, if any.
let tmp: Vec<_> = permutations
permutations
.into_iter()
.zip(pk.vk.cs.permutations.iter())
.zip(pk.permutations.iter())
Expand All @@ -362,22 +362,18 @@ pub fn create_proof<
gamma,
)
})
.collect();

tmp.into_iter().unzip()
.unzip()
})
.unzip();

let (lookups, lookup_expressions): (Vec<Vec<_>>, Vec<Vec<_>>) = lookups
.into_iter()
.map(|lookups| {
// Evaluate the h(X) polynomial's constraint system expressions for the lookup constraints, if any.
let tmp: Vec<_> = lookups
lookups
.into_iter()
.map(|p| p.construct(pk, theta, beta, gamma))
.collect();

tmp.into_iter().unzip()
.unzip()
})
.unzip();

Expand Down

0 comments on commit 00ca9aa

Please sign in to comment.