Skip to content

Commit 706ff60

Browse files
committed
fmt
1 parent d8a01cc commit 706ff60

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

src/generators.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ impl Generators {
127127
GeneratorsChain::new(&label)
128128
.take(gens_capacity)
129129
.collect::<Vec<_>>()
130-
})
131-
.collect();
130+
}).collect();
132131

133132
let H_vec = (0..party_capacity)
134133
.map(|i| {
@@ -139,8 +138,7 @@ impl Generators {
139138
GeneratorsChain::new(&label)
140139
.take(gens_capacity)
141140
.collect::<Vec<_>>()
142-
})
143-
.collect();
141+
}).collect();
144142

145143
Generators {
146144
pedersen_gens,

src/inner_product_proof.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ impl InnerProductProof {
300300
}
301301

302302
let pos = 2 * lg_n * 32;
303-
let a = Scalar::from_canonical_bytes(read32(&slice[pos..])).ok_or(ProofError::FormatError)?;
303+
let a =
304+
Scalar::from_canonical_bytes(read32(&slice[pos..])).ok_or(ProofError::FormatError)?;
304305
let b = Scalar::from_canonical_bytes(read32(&slice[pos + 32..]))
305306
.ok_or(ProofError::FormatError)?;
306307

src/range_proof/mod.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,12 @@ impl RangeProof {
297297
let T_1 = CompressedRistretto(read32(&slice[2 * 32..]));
298298
let T_2 = CompressedRistretto(read32(&slice[3 * 32..]));
299299

300-
let t_x =
301-
Scalar::from_canonical_bytes(read32(&slice[4 * 32..])).ok_or(ProofError::FormatError)?;
302-
let t_x_blinding =
303-
Scalar::from_canonical_bytes(read32(&slice[5 * 32..])).ok_or(ProofError::FormatError)?;
304-
let e_blinding =
305-
Scalar::from_canonical_bytes(read32(&slice[6 * 32..])).ok_or(ProofError::FormatError)?;
300+
let t_x = Scalar::from_canonical_bytes(read32(&slice[4 * 32..]))
301+
.ok_or(ProofError::FormatError)?;
302+
let t_x_blinding = Scalar::from_canonical_bytes(read32(&slice[5 * 32..]))
303+
.ok_or(ProofError::FormatError)?;
304+
let e_blinding = Scalar::from_canonical_bytes(read32(&slice[6 * 32..]))
305+
.ok_or(ProofError::FormatError)?;
306306

307307
let ipp_proof = InnerProductProof::from_bytes(&slice[7 * 32..])?;
308308

@@ -478,8 +478,7 @@ mod tests {
478478
&mut transcript,
479479
&mut rng,
480480
n
481-
)
482-
.is_ok()
481+
).is_ok()
483482
);
484483
}
485484
}

0 commit comments

Comments
 (0)