From 4a620f4d79efe9233d0e7682df5a2fc625b5420e Mon Sep 17 00:00:00 2001 From: Robin Salen <30937548+Nashtare@users.noreply.github.com> Date: Mon, 19 Feb 2024 08:13:32 -0500 Subject: [PATCH] Fix latest clippy for `redundant_imports` (#1535) * Fix clippy for maybe_rayon * Remove reimports --- field/src/lib.rs | 2 +- maybe_rayon/src/lib.rs | 2 +- plonky2/src/gates/coset_interpolation.rs | 2 +- plonky2/src/hash/merkle_proofs.rs | 2 -- plonky2/src/recursion/conditional_recursive_verifier.rs | 2 +- plonky2/src/recursion/recursive_verifier.rs | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/field/src/lib.rs b/field/src/lib.rs index c35441bdb7..d2fd5832b9 100644 --- a/field/src/lib.rs +++ b/field/src/lib.rs @@ -5,7 +5,7 @@ #![allow(clippy::needless_range_loop)] #![feature(specialization)] #![cfg_attr(not(test), no_std)] - +#![cfg(not(test))] extern crate alloc; pub(crate) mod arch; diff --git a/maybe_rayon/src/lib.rs b/maybe_rayon/src/lib.rs index 8e8d071862..942898492f 100644 --- a/maybe_rayon/src/lib.rs +++ b/maybe_rayon/src/lib.rs @@ -16,7 +16,7 @@ use rayon::{ prelude::*, slice::{ Chunks as ParChunks, ChunksExact as ParChunksExact, ChunksExactMut as ParChunksExactMut, - ChunksMut as ParChunksMut, ParallelSlice, ParallelSliceMut, + ChunksMut as ParChunksMut, }, }; #[cfg(not(feature = "parallel"))] diff --git a/plonky2/src/gates/coset_interpolation.rs b/plonky2/src/gates/coset_interpolation.rs index 9911e92793..a1ebd214a4 100644 --- a/plonky2/src/gates/coset_interpolation.rs +++ b/plonky2/src/gates/coset_interpolation.rs @@ -644,7 +644,7 @@ mod tests { use super::*; use crate::field::goldilocks_field::GoldilocksField; - use crate::field::types::{Field, Sample}; + use crate::field::types::Sample; use crate::gates::gate_testing::{test_eval_fns, test_low_degree}; use crate::hash::hash_types::HashOut; use crate::plonk::config::{GenericConfig, PoseidonGoldilocksConfig}; diff --git a/plonky2/src/hash/merkle_proofs.rs b/plonky2/src/hash/merkle_proofs.rs index c8fd2492fb..d773b11aaa 100644 --- a/plonky2/src/hash/merkle_proofs.rs +++ b/plonky2/src/hash/merkle_proofs.rs @@ -171,7 +171,6 @@ impl, const D: usize> CircuitBuilder { #[cfg(test)] mod tests { - use anyhow::Result; use rand::rngs::OsRng; use rand::Rng; @@ -179,7 +178,6 @@ mod tests { use crate::field::types::Field; use crate::hash::merkle_tree::MerkleTree; use crate::iop::witness::{PartialWitness, WitnessWrite}; - use crate::plonk::circuit_builder::CircuitBuilder; use crate::plonk::circuit_data::CircuitConfig; use crate::plonk::config::{GenericConfig, PoseidonGoldilocksConfig}; use crate::plonk::verifier::verify; diff --git a/plonky2/src/recursion/conditional_recursive_verifier.rs b/plonky2/src/recursion/conditional_recursive_verifier.rs index 43bef5892b..2dc6966a20 100644 --- a/plonky2/src/recursion/conditional_recursive_verifier.rs +++ b/plonky2/src/recursion/conditional_recursive_verifier.rs @@ -348,7 +348,7 @@ mod tests { use crate::gates::noop::NoopGate; use crate::iop::witness::{PartialWitness, WitnessWrite}; use crate::plonk::circuit_data::CircuitConfig; - use crate::plonk::config::{GenericConfig, PoseidonGoldilocksConfig}; + use crate::plonk::config::PoseidonGoldilocksConfig; use crate::recursion::dummy_circuit::{dummy_circuit, dummy_proof}; #[test] diff --git a/plonky2/src/recursion/recursive_verifier.rs b/plonky2/src/recursion/recursive_verifier.rs index 2da2440844..82d1e81389 100644 --- a/plonky2/src/recursion/recursive_verifier.rs +++ b/plonky2/src/recursion/recursive_verifier.rs @@ -208,7 +208,7 @@ mod tests { use crate::gates::noop::NoopGate; use crate::iop::witness::{PartialWitness, WitnessWrite}; use crate::plonk::circuit_data::{CircuitConfig, VerifierOnlyCircuitData}; - use crate::plonk::config::{GenericConfig, KeccakGoldilocksConfig, PoseidonGoldilocksConfig}; + use crate::plonk::config::{KeccakGoldilocksConfig, PoseidonGoldilocksConfig}; use crate::plonk::proof::{CompressedProofWithPublicInputs, ProofWithPublicInputs}; use crate::plonk::prover::prove; use crate::util::timing::TimingTree;