Skip to content

Commit acb909f

Browse files
committed
updated rustfmt config
1 parent 8046e7e commit acb909f

File tree

167 files changed

+709
-639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+709
-639
lines changed

air/src/air/assertions/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the root directory of this source tree.
55

6-
use crate::errors::AssertionError;
76
use alloc::vec::Vec;
87
use core::{
98
cmp::Ordering,
109
fmt::{Display, Formatter},
1110
};
11+
1212
use math::FieldElement;
1313

14+
use crate::errors::AssertionError;
15+
1416
#[cfg(test)]
1517
mod tests;
1618

@@ -326,7 +328,7 @@ impl<E: FieldElement> Display for Assertion<E> {
326328
_ => {
327329
let second_step = self.first_step + self.stride;
328330
write!(f, "steps=[{}, {}, ...], ", self.first_step, second_step)?;
329-
}
331+
},
330332
}
331333
match self.values.len() {
332334
1 => write!(f, "value={})", self.values[0]),

air/src/air/assertions/tests.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the root directory of this source tree.
55

6-
use super::{Assertion, AssertionError};
76
use alloc::vec::Vec;
7+
88
use math::{fields::f128::BaseElement, FieldElement};
99
use rand_utils::{rand_value, rand_vector};
1010

11+
use super::{Assertion, AssertionError};
12+
1113
// SINGLE ASSERTIONS
1214
// ================================================================================================
1315
#[test]

air/src/air/aux.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use alloc::{string::ToString, vec::Vec};
2+
23
use crypto::{ElementHasher, RandomCoin, RandomCoinError};
34
use math::FieldElement;
45
use utils::Deserializable;
@@ -20,10 +21,7 @@ impl<E> AuxRandElements<E> {
2021
/// Creates a new [`AuxRandElements`], where the auxiliary trace doesn't contain a Lagrange
2122
/// kernel column.
2223
pub fn new(rand_elements: Vec<E>) -> Self {
23-
Self {
24-
rand_elements,
25-
lagrange: None,
26-
}
24+
Self { rand_elements, lagrange: None }
2725
}
2826

2927
/// Creates a new [`AuxRandElements`], where the auxiliary trace contains a Lagrange kernel
@@ -32,10 +30,7 @@ impl<E> AuxRandElements<E> {
3230
rand_elements: Vec<E>,
3331
lagrange: Option<LagrangeKernelRandElements<E>>,
3432
) -> Self {
35-
Self {
36-
rand_elements,
37-
lagrange,
38-
}
33+
Self { rand_elements, lagrange }
3934
}
4035

4136
/// Returns the random elements needed to build all columns other than the Lagrange kernel one.

air/src/air/boundary/constraint.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the root directory of this source tree.
55

6-
use super::{Assertion, ExtensionOf, FieldElement};
76
use alloc::{collections::BTreeMap, vec::Vec};
7+
88
use math::{fft, polynom};
99

10+
use super::{Assertion, ExtensionOf, FieldElement};
11+
1012
// BOUNDARY CONSTRAINT
1113
// ================================================================================================
1214

air/src/air/boundary/constraint_group.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the root directory of this source tree.
55

6-
use super::{Assertion, BoundaryConstraint, ConstraintDivisor, ExtensionOf, FieldElement};
76
use alloc::{collections::BTreeMap, vec::Vec};
87

8+
use super::{Assertion, BoundaryConstraint, ConstraintDivisor, ExtensionOf, FieldElement};
9+
910
// BOUNDARY CONSTRAINT GROUP
1011
// ================================================================================================
1112
/// A group of boundary constraints all having the same divisor.
@@ -51,10 +52,7 @@ where
5152
// --------------------------------------------------------------------------------------------
5253
/// Returns a new boundary constraint group to hold constraints with the specified divisor.
5354
pub(super) fn new(divisor: ConstraintDivisor<F::BaseField>) -> Self {
54-
BoundaryConstraintGroup {
55-
constraints: Vec::new(),
56-
divisor,
57-
}
55+
BoundaryConstraintGroup { constraints: Vec::new(), divisor }
5856
}
5957

6058
// PUBLIC ACCESSORS

air/src/air/boundary/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the root directory of this source tree.
55

6-
use super::{AirContext, Assertion, ConstraintDivisor};
76
use alloc::{
87
collections::{BTreeMap, BTreeSet},
98
vec::Vec,
109
};
10+
1111
use math::{ExtensionOf, FieldElement};
1212

13+
use super::{AirContext, Assertion, ConstraintDivisor};
14+
1315
mod constraint;
1416
pub use constraint::BoundaryConstraint;
1517

@@ -125,10 +127,7 @@ impl<E: FieldElement> BoundaryConstraints<E> {
125127
&mut twiddle_map,
126128
);
127129

128-
Self {
129-
main_constraints,
130-
aux_constraints,
131-
}
130+
Self { main_constraints, aux_constraints }
132131
}
133132

134133
// PUBLIC ACCESSORS

air/src/air/boundary/tests.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the root directory of this source tree.
55

6-
use super::{
7-
super::tests::{build_prng, build_sequence_poly},
8-
Assertion, BoundaryConstraint,
9-
};
106
use alloc::{collections::BTreeMap, vec::Vec};
7+
118
use crypto::{hashers::Blake3_256, DefaultRandomCoin, RandomCoin};
129
use math::{fields::f64::BaseElement, polynom, FieldElement, StarkField};
1310
use rand_utils::{rand_value, rand_vector, shuffle};
1411

12+
use super::{
13+
super::tests::{build_prng, build_sequence_poly},
14+
Assertion, BoundaryConstraint,
15+
};
16+
1517
// BOUNDARY CONSTRAINT TESTS
1618
// ================================================================================================
1719

air/src/air/coefficients.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// LICENSE file in the root directory of this source tree.
55

66
use alloc::vec::Vec;
7+
78
use math::FieldElement;
89

910
// CONSTRAINT COMPOSITION COEFFICIENTS

air/src/air/context.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the root directory of this source tree.
55

6-
use crate::{air::TransitionConstraintDegree, ProofOptions, TraceInfo};
76
use alloc::vec::Vec;
87
use core::cmp;
8+
99
use math::StarkField;
1010

11+
use crate::{air::TransitionConstraintDegree, ProofOptions, TraceInfo};
12+
1113
// AIR CONTEXT
1214
// ================================================================================================
1315
/// STARK parameters and trace properties for a specific execution of a computation.

air/src/air/divisor.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the root directory of this source tree.
55

6-
use crate::air::Assertion;
76
use alloc::vec::Vec;
87
use core::fmt::{Display, Formatter};
8+
99
use math::{FieldElement, StarkField};
1010

11+
use crate::air::Assertion;
12+
1113
// CONSTRAINT DIVISOR
1214
// ================================================================================================
1315
/// The denominator portion of boundary and transition constraints.
@@ -34,10 +36,7 @@ impl<B: StarkField> ConstraintDivisor<B> {
3436

3537
/// Returns a new divisor instantiated from the provided parameters.
3638
fn new(numerator: Vec<(usize, B)>, exemptions: Vec<B>) -> Self {
37-
ConstraintDivisor {
38-
numerator,
39-
exemptions,
40-
}
39+
ConstraintDivisor { numerator, exemptions }
4140
}
4241

4342
/// Builds a divisor for transition constraints.
@@ -177,9 +176,10 @@ fn get_trace_domain_value_at<B: StarkField>(trace_length: usize, step: usize) ->
177176

178177
#[cfg(test)]
179178
mod tests {
180-
use super::*;
181179
use math::{fields::f128::BaseElement, polynom};
182180

181+
use super::*;
182+
183183
#[test]
184184
fn constraint_divisor_degree() {
185185
// single term numerator

0 commit comments

Comments
 (0)