From b62fa3f60880689d0ee62a8d2d39674c4871eb13 Mon Sep 17 00:00:00 2001 From: Nicholas Ward Date: Thu, 27 Jan 2022 14:54:16 -0800 Subject: [PATCH] fmt --- plonky2/src/curve/ecdsa.rs | 2 +- plonky2/src/gadgets/biguint.rs | 9 +++++---- plonky2/src/gadgets/curve.rs | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plonky2/src/curve/ecdsa.rs b/plonky2/src/curve/ecdsa.rs index 3276e9cb..787567aa 100644 --- a/plonky2/src/curve/ecdsa.rs +++ b/plonky2/src/curve/ecdsa.rs @@ -1,4 +1,4 @@ -use crate::curve::curve_types::{AffinePoint, base_to_scalar, Curve, CurveScalar}; +use crate::curve::curve_types::{base_to_scalar, AffinePoint, Curve, CurveScalar}; use crate::field::field_types::Field; pub struct ECDSASignature { diff --git a/plonky2/src/gadgets/biguint.rs b/plonky2/src/gadgets/biguint.rs index 15c2a630..c9ad7280 100644 --- a/plonky2/src/gadgets/biguint.rs +++ b/plonky2/src/gadgets/biguint.rs @@ -160,10 +160,11 @@ impl, const D: usize> CircuitBuilder { let t = b.target; BigUintTarget { - limbs: a.limbs - .iter() - .map(|&l| U32Target(self.mul(l.0, t))) - .collect(), + limbs: a + .limbs + .iter() + .map(|&l| U32Target(self.mul(l.0, t))) + .collect(), } } diff --git a/plonky2/src/gadgets/curve.rs b/plonky2/src/gadgets/curve.rs index d16aaefa..59b13840 100644 --- a/plonky2/src/gadgets/curve.rs +++ b/plonky2/src/gadgets/curve.rs @@ -135,7 +135,7 @@ impl, const D: usize> CircuitBuilder { for &bit in bits.iter() { let not_bit = self.not(bit); - + let result_plus_2_i_p = self.curve_add(&result, &two_i_times_p); let new_x_if_bit = self.mul_nonnative_by_bool(&result_plus_2_i_p.x, bit);