From 2cd5d8fc2fc17aa4a83673d394749bceb557150a Mon Sep 17 00:00:00 2001 From: guorong009 Date: Fri, 7 Jun 2024 15:02:47 +0800 Subject: [PATCH] patch: add the Debug attribute --- halo2_backend/src/plonk/circuit.rs | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/halo2_backend/src/plonk/circuit.rs b/halo2_backend/src/plonk/circuit.rs index d617ef131..c57b91b76 100644 --- a/halo2_backend/src/plonk/circuit.rs +++ b/halo2_backend/src/plonk/circuit.rs @@ -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, @@ -255,28 +257,6 @@ pub(crate) struct PinnedConstraintSystem<'a, F: Field> { minimum_degree: &'a Option, } -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.