Skip to content

Commit

Permalink
patch: add the Debug attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
guorong009 committed Jun 7, 2024
1 parent b0c6abf commit 2cd5d8f
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions halo2_backend/src/plonk/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ impl<'a, F: Field> std::fmt::Debug for PinnedGates<'a, F> {
}

/// Represents the minimal parameters that determine a `ConstraintSystem`.
#[allow(dead_code)]
#[derive(Debug)]
pub(crate) struct PinnedConstraintSystem<'a, F: Field> {
num_fixed_columns: &'a usize,
num_advice_columns: &'a usize,
Expand All @@ -255,28 +257,6 @@ pub(crate) struct PinnedConstraintSystem<'a, F: Field> {
minimum_degree: &'a Option<usize>,
}

impl<'a, F: Field> std::fmt::Debug for PinnedConstraintSystem<'a, F> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut debug_struct = f.debug_struct("PinnedConstraintSystem");
debug_struct
.field("num_fixed_columns", self.num_fixed_columns)
.field("num_advice_columns", self.num_advice_columns)
.field("num_instance_columns", self.num_instance_columns)
.field("num_challenges", self.num_challenges)
.field("advice_column_phase", self.advice_column_phase)
.field("challenge_phase", self.challenge_phase)
.field("gates", &self.gates)
.field("advice_queries", self.advice_queries)
.field("instance_queries", self.instance_queries)
.field("fixed_queries", self.fixed_queries)
.field("permutation", self.permutation)
.field("lookups", self.lookups)
.field("shuffles", self.shuffles)
.field("minimum_degree", self.minimum_degree);
debug_struct.finish()
}
}

// Cost functions: arguments required degree

/// Returns the minimum circuit degree required by the permutation argument.
Expand Down

0 comments on commit 2cd5d8f

Please sign in to comment.