From eb57ded200a734d7091ae1d82d8e20a1bb23d263 Mon Sep 17 00:00:00 2001 From: Mason Liang Date: Mon, 23 Oct 2023 21:49:34 -0400 Subject: [PATCH] clippy --- src/assignment_map.rs | 6 +++--- src/gadgets/byte_bit.rs | 5 +++-- src/gadgets/byte_representation.rs | 3 ++- src/gadgets/canonical_representation.rs | 3 ++- src/gadgets/key_bit.rs | 4 +++- src/mpt.rs | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/assignment_map.rs b/src/assignment_map.rs index 3700dcc0..99908fec 100644 --- a/src/assignment_map.rs +++ b/src/assignment_map.rs @@ -4,8 +4,7 @@ use crate::constraint_builder::{ use halo2_proofs::{ arithmetic::FieldExt, circuit::{Region, Value}, - halo2curves::bn256::Fr, - plonk::{Challenge, ConstraintSystem, Error, Expression, VirtualCells}, + plonk::Error, }; use rayon::prelude::*; use std::collections::HashMap; @@ -79,7 +78,8 @@ impl AssignmentMap { Column::SecondPhaseAdvice(s) => { region.assign_advice(|| "second phase advice", s.0, offset, || value) } - }; + } + .unwrap(); } Ok(()) }] diff --git a/src/gadgets/byte_bit.rs b/src/gadgets/byte_bit.rs index 30453e68..5537531a 100644 --- a/src/gadgets/byte_bit.rs +++ b/src/gadgets/byte_bit.rs @@ -3,7 +3,7 @@ use crate::assignment_map::Column; use halo2_proofs::{ arithmetic::FieldExt, circuit::{Region, Value}, - plonk::{ConstraintSystem, Error}, + plonk::ConstraintSystem, }; use rayon::prelude::*; @@ -42,7 +42,8 @@ impl ByteBitGadget { match column { Column::Fixed(s) => region.assign_fixed(|| "fixed", s.0, offset, || value), _ => unreachable!(), - }; + } + .unwrap(); } } diff --git a/src/gadgets/byte_representation.rs b/src/gadgets/byte_representation.rs index 45a5f83f..53f6ce11 100644 --- a/src/gadgets/byte_representation.rs +++ b/src/gadgets/byte_representation.rs @@ -117,7 +117,8 @@ impl ByteRepresentationConfig { region.assign_advice(|| "second phase advice", s.0, offset, || value) } _ => unreachable!(), - }; + } + .unwrap(); } } diff --git a/src/gadgets/canonical_representation.rs b/src/gadgets/canonical_representation.rs index 9e832215..6829c0fb 100644 --- a/src/gadgets/canonical_representation.rs +++ b/src/gadgets/canonical_representation.rs @@ -148,7 +148,8 @@ impl CanonicalRepresentationConfig { Column::SecondPhaseAdvice(s) => { region.assign_advice(|| "second phase advice", s.0, offset, || value) } - }; + } + .unwrap(); } } diff --git a/src/gadgets/key_bit.rs b/src/gadgets/key_bit.rs index c4c95bb1..6d13d418 100644 --- a/src/gadgets/key_bit.rs +++ b/src/gadgets/key_bit.rs @@ -97,7 +97,9 @@ impl KeyBitConfig { let assignments: Vec<_> = self.assignments(lookups).collect(); for ((column, offset), value) in assignments.into_iter() { match column { - Column::Advice(s) => region.assign_advice(|| "advice", s.0, offset, || value), + Column::Advice(s) => region + .assign_advice(|| "advice", s.0, offset, || value) + .unwrap(), _ => unreachable!(), }; } diff --git a/src/mpt.rs b/src/mpt.rs index d904855e..bd03cff8 100644 --- a/src/mpt.rs +++ b/src/mpt.rs @@ -158,7 +158,7 @@ impl MptCircuitConfig { Ok(()) }, - ); + )?; let mut keys = mpt_update_keys(proofs); keys.sort();