diff --git a/examples/circuit-layout.rs b/examples/circuit-layout.rs index 6020686..93ad054 100644 --- a/examples/circuit-layout.rs +++ b/examples/circuit-layout.rs @@ -8,6 +8,7 @@ use halo2::{ use plotters::prelude::*; use std::marker::PhantomData; +#[allow(clippy::many_single_char_names)] fn main() { /// This represents an advice column at a certain row in the ConstraintSystem #[derive(Copy, Clone, Debug)] @@ -372,7 +373,7 @@ fn main() { } let a = Fp::rand(); - let a_squared = a * &a; + let a_squared = a * a; let aux = Fp::one() + Fp::one(); let lookup_table = vec![aux, a, a, Fp::zero()]; let lookup_table_2 = vec![Fp::zero(), a, a_squared, Fp::zero()]; diff --git a/src/dev/graph/layout.rs b/src/dev/graph/layout.rs index 7131680..78c8657 100644 --- a/src/dev/graph/layout.rs +++ b/src/dev/graph/layout.rs @@ -107,7 +107,7 @@ pub fn circuit_layout, DB: DrawingBackend> if let Some(offset) = region.offset { // Sort the region's columns according to the defined ordering. let mut columns: Vec<_> = region.columns.into_iter().collect(); - columns.sort_unstable_by(|a, b| column_index(a).cmp(&column_index(b))); + columns.sort_unstable_by_key(|a| column_index(a)); // Render contiguous parts of the same region as a single box. let mut width = None;