Re-introduce the wildcard when importing multipl enum/structs
MODIFY
kimchi/src/circuits/expr.rs
kimchi/src/circuits/expr.rs
@@ -1640,10 +1640,7 @@ impl<F: Neg<Output = F> + Clone + One + Zero + PartialEq> Expr<F> {
h
};
let constant = |e: Expr<F>| sing(vec![], e);
- use Expr::{
- BinOp, Cache, Cell, Constant, Double, Pow, Square, UnnormalizedLagrangeBasis,
- VanishesOnLast4Rows,
- };
+ use Expr::*;
if self.is_constant(ev) {
return constant(self.clone());
@@ -2013,9 +2010,7 @@ impl<F: Field> Mul<F> for Expr<ConstantExpr<F>> {
impl<F: PrimeField> ConstantExpr<F> {
fn ocaml(&self) -> String {
- use ConstantExpr::{
- Add, Alpha, Beta, EndoCoefficient, Gamma, JointCombiner, Literal, Mds, Mul, Pow, Sub,
- };
+ use ConstantExpr::*;
match self {
Alpha => "alpha".to_string(),
Beta => "beta".to_string(),
@@ -2035,9 +2030,7 @@ impl<F: PrimeField> ConstantExpr<F> {
}
fn latex(&self) -> String {
- use ConstantExpr::{
- Add, Alpha, Beta, EndoCoefficient, Gamma, JointCombiner, Literal, Mds, Mul, Pow, Sub,
- };
+ use ConstantExpr::*;
match self {
Alpha => "\\alpha".to_string(),
Beta => "\\beta".to_string(),
@@ -2353,7 +2346,7 @@ pub fn coeff<F>(i: usize) -> E<F> {
/// You can import this module like `use kimchi::circuits::expr::prologue::*` to obtain a number of handy aliases and helpers
pub mod prologue {
- pub use super::{coeff, constant, index, witness, witness_curr, witness_next, E};
+ pub use super::*;
}
#[cfg(test)]

MODIFY
kimchi/src/circuits/polynomials/generic.rs
kimchi/src/circuits/polynomials/generic.rs
@@ -314,10 +314,7 @@ impl<F: PrimeField> ConstraintSystem<F> {
// -------------------------------------------------
pub mod testing {
- use super::{
- array, CircuitGate, ConstraintSystem, DensePolynomial, FftField, GateType, GenericGateSpec,
- PrimeField, Zero, COLUMNS, GENERIC_COEFFS, GENERIC_REGISTERS,
- };
+ use super::*;
use crate::circuits::wires::Wire;
use itertools::iterate;

MODIFY
kimchi/src/circuits/polynomials/turshi.rs
kimchi/src/circuits/polynomials/turshi.rs
@@ -274,7 +274,7 @@ impl<F: PrimeField> CircuitGate<F> {
}
pub mod witness {
- use super::{CairoInstruction, CairoProgram, Field, FlagBits, Offsets, Pointers, COLUMNS};
+ use super::*;
/// Returns the witness of an execution of a Cairo program in `CircuitGate` format
pub fn cairo_witness<F: Field>(prog: &CairoProgram<F>) -> [Vec<F>; COLUMNS] {
@@ -425,7 +425,7 @@ pub mod witness {
}
pub mod testing {
- use super::{array, CircuitGate, FftField, GateType, PrimeField, COLUMNS, NUM_FLAGS};
+ use super::*;
/// verifies that the Cairo gate constraints are solved by the witness depending on its type
///

MODIFY
kimchi/src/linearization.rs
kimchi/src/linearization.rs
@@ -4,7 +4,7 @@ use crate::alphas::Alphas;
use crate::circuits::argument::{Argument, ArgumentType};
use crate::circuits::lookup;
use crate::circuits::lookup::constraints::LookupConfiguration;
-use crate::circuits::polynomials::chacha::{ChaCha0, ChaCha1, ChaCha2, ChaChaFinal};
+use crate::circuits::polynomials::chacha::*;
use crate::circuits::polynomials::complete_add::CompleteAdd;
use crate::circuits::polynomials::endomul_scalar::EndomulScalar;
use crate::circuits::polynomials::endosclmul::EndosclMul;
@@ -95,7 +95,7 @@ pub fn linearization_columns<F: FftField + SquareRootField>(
lookup_constraint_system: Option<&LookupConfiguration<F>>,
) -> std::collections::HashSet<Column> {
let mut h = std::collections::HashSet::new();
- use Column::{Index, LookupAggreg, LookupRuntimeTable, LookupSorted, LookupTable, Witness, Z};
+ use Column::*;
// the witness polynomials
for i in 0..COLUMNS {

MODIFY
kimchi/src/prover.rs
kimchi/src/prover.rs
@@ -600,10 +600,7 @@ where
let lagrange = index.cs.evaluate(&witness_poly, &z_poly);
let env = {
let mut index_evals = HashMap::new();
- use GateType::{
- ChaCha0, ChaCha1, ChaCha2, ChaChaFinal, CompleteAdd, EndoMul, EndoMulScalar,
- Poseidon, VarBaseMul,
- };
+ use GateType::*;
index_evals.insert(Poseidon, &index.cs.ps8);
index_evals.insert(CompleteAdd, &index.cs.complete_addl4);
index_evals.insert(VarBaseMul, &index.cs.mull8);

MODIFY
kimchi/src/prover_index.rs
kimchi/src/prover_index.rs
@@ -141,7 +141,7 @@ impl<G: KimchiCurve> ProverIndex<G> {
}
pub mod testing {
- use super::{Arc, ConstraintSystem, EvaluationDomain, ProverIndex, SRS};
+ use super::*;
use crate::circuits::{
gate::CircuitGate,
lookup::{runtime_tables::RuntimeTableCfg, tables::LookupTable},

Re-introduce the wildcard when importing multipl enum/structs