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() .iter()
.map(|c| load(c, input_row)) .map(|c| load(c, input_row))
.collect(); .collect();
if !(0..n) let lookup_passes = (0..n)
.map(|table_row| { .map(|table_row| {
lookup lookup
.table_expressions .table_expressions
.iter() .iter()
.map(move |c| load(c, table_row)) .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 { return Err(VerifyFailure::Lookup {
lookup_index, lookup_index,
row: input_row as usize, row: input_row as usize,

View file

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