remove redundant condition

This commit is contained in:
poma 2020-01-15 13:04:08 +07:00
parent f66fe1eb9e
commit 4d9afd031c
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657

@ -63,7 +63,7 @@ impl<'a, E: Engine> Circuit<E> for CircomCircuit<'a> {
}
let mut constrained: BTreeMap<usize, bool> = BTreeMap::new();
let mut constraint_num = 0;
for (i, constraint) in circuit_json.constraints.iter().enumerate() {
for (_i, constraint) in circuit_json.constraints.iter().enumerate() {
let mut lcs = vec![];
for lc_description in constraint {
let mut lc = LinearCombination::<E>::zero();
@ -75,11 +75,7 @@ impl<'a, E: Engine> Circuit<E> for CircomCircuit<'a> {
Index::Aux(var_index_num - num_public_inputs)
};
constrained.insert(var_index_num, true);
if i == 2 {
lc = lc + (E::Fr::from_str(coefficient_str).unwrap(), Variable::new_unchecked(var_index));
} else {
lc = lc + (E::Fr::from_str(coefficient_str).unwrap(), Variable::new_unchecked(var_index));
}
}
lcs.push(lc);
}