clippy: fix assign_op_pattern

Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
ljedrz 2020-10-05 16:49:38 +02:00
parent 919c1dcada
commit 266e6247e4
3 changed files with 6 additions and 6 deletions

View File

@ -87,7 +87,7 @@ macro_rules! add_int_impl {
all_constants = false;
// Add the coeff * bit_gadget
lc = lc + (coeff, bit.get_variable());
lc += (coeff, bit.get_variable());
}
Boolean::Not(ref bit) => {
all_constants = false;
@ -97,7 +97,7 @@ macro_rules! add_int_impl {
}
Boolean::Constant(bit) => {
if bit {
lc = lc + (coeff, CS::one());
lc += (coeff, CS::one());
}
}
}

View File

@ -206,13 +206,13 @@ macro_rules! div_int_impl {
&r
)?;
index = index - 1;
index -= 1;
let mut q_new = q.clone();
q_new.bits[index] = true_bit.clone();
q_new.value = Some(q_new.value.unwrap() + bit_value);
bit_value = (bit_value >> 1);
bit_value >>= 1;
q = Self::conditionally_select(
&mut cs.ns(|| format!("set_bit_or_same_{}", i)),

View File

@ -146,7 +146,7 @@ macro_rules! mul_int_impl {
all_constants = false;
// Add the coeff * bit_gadget
lc = lc + (coeff, bit.get_variable());
lc += (coeff, bit.get_variable());
}
Boolean::Not(ref bit) => {
all_constants = false;
@ -156,7 +156,7 @@ macro_rules! mul_int_impl {
}
Boolean::Constant(bit) => {
if bit {
lc = lc + (coeff, CS::one());
lc += (coeff, CS::one());
}
}
}