Skip to content

Commit

Permalink
Fix some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
entropidelic committed Jan 16, 2024
1 parent d2b86d5 commit 1480306
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
35 changes: 35 additions & 0 deletions provers/cairo/src/transition_constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ impl BitPrefixFlag0 {
Self
}
}
impl Default for BitPrefixFlag0 {
fn default() -> Self {
Self::new()
}
}

impl TransitionConstraint<Stark252PrimeField, Stark252PrimeField> for BitPrefixFlag0 {
fn degree(&self) -> usize {
Expand Down Expand Up @@ -57,6 +62,11 @@ impl BitPrefixFlag1 {
Self
}
}
impl Default for BitPrefixFlag1 {
fn default() -> Self {
Self::new()
}
}

impl TransitionConstraint<Stark252PrimeField, Stark252PrimeField> for BitPrefixFlag1 {
fn degree(&self) -> usize {
Expand Down Expand Up @@ -103,6 +113,11 @@ impl BitPrefixFlag2 {
Self
}
}
impl Default for BitPrefixFlag2 {
fn default() -> Self {
Self::new()
}
}

impl TransitionConstraint<Stark252PrimeField, Stark252PrimeField> for BitPrefixFlag2 {
fn degree(&self) -> usize {
Expand Down Expand Up @@ -149,6 +164,11 @@ impl BitPrefixFlag3 {
Self
}
}
impl Default for BitPrefixFlag3 {
fn default() -> Self {
Self::new()
}
}

impl TransitionConstraint<Stark252PrimeField, Stark252PrimeField> for BitPrefixFlag3 {
fn degree(&self) -> usize {
Expand Down Expand Up @@ -195,6 +215,11 @@ impl BitPrefixFlag4 {
Self
}
}
impl Default for BitPrefixFlag4 {
fn default() -> Self {
Self::new()
}
}

impl TransitionConstraint<Stark252PrimeField, Stark252PrimeField> for BitPrefixFlag4 {
fn degree(&self) -> usize {
Expand Down Expand Up @@ -241,6 +266,11 @@ impl BitPrefixFlag5 {
Self
}
}
impl Default for BitPrefixFlag5 {
fn default() -> Self {
Self::new()
}
}

impl TransitionConstraint<Stark252PrimeField, Stark252PrimeField> for BitPrefixFlag5 {
fn degree(&self) -> usize {
Expand Down Expand Up @@ -287,6 +317,11 @@ impl BitPrefixFlag6 {
Self
}
}
impl Default for BitPrefixFlag6 {
fn default() -> Self {
Self::new()
}
}

impl TransitionConstraint<Stark252PrimeField, Stark252PrimeField> for BitPrefixFlag6 {
fn degree(&self) -> usize {
Expand Down
4 changes: 2 additions & 2 deletions provers/stark/src/constraints/evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl<A: AIR> ConstraintEvaluator<A> {
#[cfg(not(feature = "parallel"))]
let boundary_eval_iter = 0..domain.lde_roots_of_unity_coset.len();

let boundary_evaluation = boundary_eval_iter
let boundary_evaluation: Vec<_> = boundary_eval_iter
.map(|domain_index| {
(0..number_of_b_constraints)
.zip(boundary_coefficients)
Expand All @@ -110,7 +110,7 @@ impl<A: AIR> ConstraintEvaluator<A> {
* &boundary_polys_evaluations[constraint_index][domain_index]
})
})
.collect_vec();
.collect();

#[cfg(all(debug_assertions, not(feature = "parallel")))]
let boundary_zerofiers = Vec::new();
Expand Down
5 changes: 5 additions & 0 deletions provers/stark/src/examples/simple_periodic_cols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ impl<F: IsFFTField> PeriodicConstraint<F> {
}
}
}
impl<F: IsFFTField> Default for PeriodicConstraint<F> {
fn default() -> Self {
Self::new()
}
}

impl<F> TransitionConstraint<F, F> for PeriodicConstraint<F>
where
Expand Down
1 change: 0 additions & 1 deletion provers/stark/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ pub fn get_trace_evaluations<F, E>(
frame_offsets: &[usize],
primitive_root: &FieldElement<F>,
step_size: usize,
// ) -> (Vec<Vec<FieldElement<E>>>, Vec<Vec<FieldElement<E>>>)
) -> Table<E>
where
F: IsSubFieldOf<E>,
Expand Down

0 comments on commit 1480306

Please sign in to comment.