Clippy fixes

This commit is contained in:
therealyingtong 2021-02-16 17:16:47 +08:00 committed by Sean Bowe
parent df2d818891
commit 6a7f869f66
No known key found for this signature in database
GPG key ID: 95684257D8F8B031
2 changed files with 14 additions and 8 deletions

View file

@ -341,15 +341,15 @@ impl<F: FieldExt> MockProver<F> {
.iter()
.map(|c| load(c, input_row))
.collect();
if !(0..n)
let lookup_passes = (0..n)
.map(|table_row| {
lookup
.table_expressions
.iter()
.map(move |c| load(c, table_row))
})
.any(|table_row| table_row.eq(inputs.iter().cloned()))
{
.any(|table_row| table_row.eq(inputs.iter().cloned()));
if !lookup_passes {
return Err(VerifyFailure::Lookup {
lookup_index,
row: input_row as usize,

View file

@ -116,11 +116,17 @@ impl<F: FieldExt> Argument<F> {
},
&|a, b| a + &b,
&|a, b| {
let a = &mut a.clone();
for (a_, b_) in a.iter_mut().zip(b.iter()) {
*a_ *= b_;
}
a.clone()
let mut modified_a = vec![C::Scalar::one(); params.n as usize];
parallelize(&mut modified_a, |modified_a, start| {
for ((modified_a, a), b) in modified_a
.iter_mut()
.zip(a[start..].iter())
.zip(b[start..].iter())
{
*modified_a *= *a * b;
}
});
pk.vk.domain.lagrange_from_vec(modified_a)
},
&|a, scalar| a * scalar,
)