Fix the missing lint warnings
MODIFY
kimchi/src/circuits/expr.rs
kimchi/src/circuits/expr.rs
@@ -2006,6 +2006,7 @@ impl<F: Field> Mul<F> for Expr<ConstantExpr<F>> {
//
// Display
//
+
impl<F: PrimeField> ConstantExpr<F> {
fn ocaml(&self) -> String {
use ConstantExpr::*;

MODIFY
kimchi/src/circuits/lookup/lookups.rs
kimchi/src/circuits/lookup/lookups.rs
@@ -405,7 +405,7 @@ impl LookupPattern {
/// Returns the lookup pattern used by a [`GateType`] on a given row (current or next).
pub fn from_gate(gate_type: GateType, curr_or_next: CurrOrNext) -> Option<Self> {
use CurrOrNext::{Curr, Next};
- use GateType::{ChaCha0, ChaCha1, ChaCha2, ChaChaFinal, Lookup, RangeCheck0, RangeCheck1};
+ use GateType::*;
match (gate_type, curr_or_next) {
(ChaCha0 | ChaCha1 | ChaCha2, Curr | Next) => Some(LookupPattern::ChaCha),
(ChaChaFinal, Curr | Next) => Some(LookupPattern::ChaChaFinal),

MODIFY
kimchi/src/circuits/polynomials/generic.rs
kimchi/src/circuits/polynomials/generic.rs
@@ -422,7 +422,6 @@ pub mod testing {
/// # Panics
///
/// Will panic if `gates_row` is None.
-
pub fn create_circuit<F: PrimeField>(start_row: usize, public: usize) -> Vec<CircuitGate<F>> {
// create constraint system with a single generic gate
let mut gates = vec![];

MODIFY
kimchi/src/linearization.rs
kimchi/src/linearization.rs
@@ -144,7 +144,7 @@ pub fn expr_linearization<F: FftField + SquareRootField>(
let linearization = expr
.linearize(evaluated_cols)
.unwrap()
- .map(|x| x.to_polish());
+ .map(|e| e.to_polish());
(linearization, powers_of_alpha)
}

MODIFY
kimchi/src/snarky/constraint_system.rs
kimchi/src/snarky/constraint_system.rs
@@ -88,7 +88,7 @@ impl<Field: PrimeField> GateSpec<usize, Field> {
let wires: Vec<_> = wired_to
.into_iter()
.take(PERMUTS)
- .map(Position::to_rust_wire)
+ .map(|x| x.to_rust_wire())
.collect();
CircuitGate {
typ: kind,
@@ -666,7 +666,6 @@ impl<Field: PrimeField, Gates: GateVector<Field>> SnarkyConstraintSystem<Field,
It returns the output variable as (1, `Var res),
unless the output is a constant, in which case it returns (c, `Constant).
*/
-
fn reduce_lincom<Cvar>(&mut self, x: Cvar) -> (Field, ConstantOrVar)
where
Cvar: SnarkyCvar<Field = Field>,

MODIFY
kimchi/src/tests/framework.rs
kimchi/src/tests/framework.rs
@@ -57,6 +57,7 @@ impl TestFramework {
self.gates = Some(gates);
self
}
+
#[must_use]
pub(crate) fn witness(mut self, witness: [Vec<Fp>; COLUMNS]) -> Self {
self.witness = Some(witness);

Fix the missing lint warnings