mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-12 00:41:32 +01:00
Use operator syntax
eliminate a few redundant references
This commit is contained in:
committed by
Pratyush Mishra
parent
b42d5f8d36
commit
f1d8b122fc
@@ -364,7 +364,7 @@ impl<F: PrimeField> ToBitsGadget<F> for FpGadget<F> {
|
||||
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<F: PrimeField> ToBytesGadget<F> for FpGadget<F> {
|
||||
{
|
||||
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!(),
|
||||
|
||||
Reference in New Issue
Block a user