diff --git a/crypto-primitives/src/crh/bowe_hopwood/mod.rs b/crypto-primitives/src/crh/bowe_hopwood/mod.rs index 61a21bf..95e04e5 100644 --- a/crypto-primitives/src/crh/bowe_hopwood/mod.rs +++ b/crypto-primitives/src/crh/bowe_hopwood/mod.rs @@ -134,10 +134,10 @@ impl FixedLengthCRH for BoweHopwoodPedersenCRH FixedLengthCRH for PedersenCRH { let mut encoded = G::zero(); for (bit, base) in bits.iter().zip(generator_powers.iter()) { if *bit { - encoded = encoded + base; + encoded += base; } } encoded diff --git a/r1cs-std/src/bits/uint32.rs b/r1cs-std/src/bits/uint32.rs index 9fa4f56..8349df6 100644 --- a/r1cs-std/src/bits/uint32.rs +++ b/r1cs-std/src/bits/uint32.rs @@ -205,7 +205,7 @@ impl UInt32 { all_constants = false; // Add coeff * bit_gadget - lc = lc + (coeff, bit.get_variable()); + lc += (coeff, bit.get_variable()); }, Boolean::Not(ref bit) => { all_constants = false; @@ -215,7 +215,7 @@ impl UInt32 { }, Boolean::Constant(bit) => { if bit { - lc = lc + (coeff, CS::one()); + lc += (coeff, CS::one()); } }, } diff --git a/r1cs-std/src/fields/fp.rs b/r1cs-std/src/fields/fp.rs index 169b70d..fdc685f 100644 --- a/r1cs-std/src/fields/fp.rs +++ b/r1cs-std/src/fields/fp.rs @@ -364,7 +364,7 @@ impl ToBitsGadget for FpGadget { let mut coeff = F::one(); for bit in bits.iter().rev() { - lc = lc + (coeff, bit.get_variable()); + lc += (coeff, bit.get_variable()); coeff.double_in_place(); } @@ -412,7 +412,7 @@ impl ToBytesGadget for FpGadget { { match bit { Boolean::Is(bit) => { - lc = lc + (coeff, bit.get_variable()); + lc += (coeff, bit.get_variable()); coeff.double_in_place(); }, Boolean::Constant(_) | Boolean::Not(_) => unreachable!(), diff --git a/r1cs-std/src/groups/curves/twisted_edwards/mod.rs b/r1cs-std/src/groups/curves/twisted_edwards/mod.rs index 0d05e9f..4951131 100644 --- a/r1cs-std/src/groups/curves/twisted_edwards/mod.rs +++ b/r1cs-std/src/groups/curves/twisted_edwards/mod.rs @@ -994,7 +994,7 @@ mod projective_impl { let mut coords = vec![]; for _ in 0..4 { coords.push(acc_power); - acc_power = acc_power + base_power; + acc_power += base_power; } let bits = bits.borrow().to_bits(