diff --git a/src/field/fft.rs b/src/field/fft.rs index 6200e29a..5b81ea06 100644 --- a/src/field/fft.rs +++ b/src/field/fft.rs @@ -13,7 +13,7 @@ enum FftStrategy { const FFT_STRATEGY: FftStrategy = FftStrategy::Classic; -type FftRootTable = Vec>; +type FftRootTable = Vec>; fn fft_classic_root_table(n: usize) -> FftRootTable { let lg_n = log2_strict(n); diff --git a/src/gates/gate_testing.rs b/src/gates/gate_testing.rs index 824b1000..e6f1b3e7 100644 --- a/src/gates/gate_testing.rs +++ b/src/gates/gate_testing.rs @@ -3,7 +3,7 @@ use anyhow::{ensure, Result}; use crate::field::extension_field::{Extendable, FieldExtension}; use crate::field::field_types::Field; use crate::gates::gate::Gate; -use crate::hash::hash_types::{HashOut, HashOutTarget}; +use crate::hash::hash_types::{HashOut}; use crate::iop::witness::PartialWitness; use crate::plonk::circuit_builder::CircuitBuilder; use crate::plonk::circuit_data::CircuitConfig; diff --git a/src/gates/gate_tree.rs b/src/gates/gate_tree.rs index 6402f7cd..9cf3fe26 100644 --- a/src/gates/gate_tree.rs +++ b/src/gates/gate_tree.rs @@ -244,7 +244,6 @@ mod tests { GateRef::new(GMiMCGate::::new_automatic_constants()), GateRef::new(InterpolationGate::new(4)), ]; - let len = gates.len(); let (tree, _, _) = Tree::from_gates(gates.clone()); let mut gates_with_prefix = tree.traversal(); @@ -277,7 +276,7 @@ mod tests { "Total degree is larger than 8." ); - gates_with_prefix.sort_unstable_by_key(|(g, p)| p.len()); + gates_with_prefix.sort_unstable_by_key(|(_g, p)| p.len()); for i in 0..gates_with_prefix.len() { for j in i + 1..gates_with_prefix.len() { assert_ne!( diff --git a/src/gates/gmimc.rs b/src/gates/gmimc.rs index 146f7b6f..9c04b7be 100644 --- a/src/gates/gmimc.rs +++ b/src/gates/gmimc.rs @@ -326,7 +326,7 @@ mod tests { use anyhow::Result; use crate::field::crandall_field::CrandallField; - use crate::field::extension_field::quartic::QuarticCrandallField; + use crate::field::field_types::Field; use crate::gates::gate::Gate; use crate::gates::gate_testing::{test_eval_fns, test_low_degree}; diff --git a/src/gates/insertion.rs b/src/gates/insertion.rs index a2e03580..b3d54993 100644 --- a/src/gates/insertion.rs +++ b/src/gates/insertion.rs @@ -301,7 +301,6 @@ impl, const D: usize> SimpleGenerator for InsertionGenerator let mut insert_here_vals = vec![F::ZERO; vec_size]; insert_here_vals.insert(insertion_index, F::ONE); - let mut result = GeneratedValues::::with_capacity((vec_size + 1) * (D + 2)); for i in 0..=vec_size { let output_wires = self.gate.wires_output_list_item(i).map(local_wire); out_buffer.set_ext_wires(output_wires, new_vec[i]); diff --git a/src/gates/interpolation.rs b/src/gates/interpolation.rs index 0cb6ea98..d04ca5e8 100644 --- a/src/gates/interpolation.rs +++ b/src/gates/interpolation.rs @@ -267,7 +267,6 @@ impl, const D: usize> SimpleGenerator for InterpolationGener .collect::>(); let interpolant = interpolant(&points); - let mut result = GeneratedValues::::with_capacity(D * (self.gate.num_points + 1)); for (i, &coeff) in interpolant.coeffs.iter().enumerate() { let wires = self.gate.wires_coeff(i).map(local_wire); out_buffer.set_ext_wires(wires, coeff); diff --git a/src/gates/noop.rs b/src/gates/noop.rs index bd99be21..add5f296 100644 --- a/src/gates/noop.rs +++ b/src/gates/noop.rs @@ -56,7 +56,7 @@ impl, const D: usize> Gate for NoopGate { #[cfg(test)] mod tests { - use anyhow::Result; + use crate::field::crandall_field::CrandallField; use crate::gates::gate_testing::{test_eval_fns, test_low_degree}; diff --git a/src/gates/reducing.rs b/src/gates/reducing.rs index 92f00455..cfdcaf17 100644 --- a/src/gates/reducing.rs +++ b/src/gates/reducing.rs @@ -198,7 +198,6 @@ impl, const D: usize> SimpleGenerator for ReducingGenerator< let output = ExtensionTarget::from_range(self.gate_index, ReducingGate::::wires_output()); - let mut result = GeneratedValues::::with_capacity(self.gate.num_coeffs + 1); let mut acc = old_acc; for i in 0..self.gate.num_coeffs { let computed_acc = acc * alpha + coeffs[i].into(); diff --git a/src/plonk/circuit_builder.rs b/src/plonk/circuit_builder.rs index e869963e..50e5f3e6 100644 --- a/src/plonk/circuit_builder.rs +++ b/src/plonk/circuit_builder.rs @@ -309,7 +309,7 @@ impl, const D: usize> CircuitBuilder { // then the `ExtensionTarget` as a whole is constant. let const_coeffs: Vec = target .0 - .into_iter() + .iter() .filter_map(|&t| self.target_as_constant(t)) .collect(); diff --git a/src/polynomial/division.rs b/src/polynomial/division.rs index 07bf0fe3..7dba226a 100644 --- a/src/polynomial/division.rs +++ b/src/polynomial/division.rs @@ -201,8 +201,6 @@ mod tests { fn division_by_z_h() { type F = CrandallField; let zero = F::ZERO; - let one = F::ONE; - let two = F::TWO; let three = F::from_canonical_u64(3); let four = F::from_canonical_u64(4); let five = F::from_canonical_u64(5); @@ -229,7 +227,7 @@ mod tests { let ev = poly.eval(z); let timer = Instant::now(); - let (quotient, ev2) = poly.div_rem(&PolynomialCoeffs::new(vec![-z, F::ONE])); + let (_quotient, ev2) = poly.div_rem(&PolynomialCoeffs::new(vec![-z, F::ONE])); println!("{:.3}s for usual", timer.elapsed().as_secs_f32()); assert_eq!(ev2.trimmed().coeffs, vec![ev]);