diff --git a/evm/src/cpu/gas.rs b/evm/src/cpu/gas.rs index 9fb32298..40cee3b9 100644 --- a/evm/src/cpu/gas.rs +++ b/evm/src/cpu/gas.rs @@ -60,6 +60,7 @@ const SIMPLE_OPCODES: OpsColumnsView> = OpsColumnsView { exception: None, }; +#[allow(clippy::useless_conversion)] // For izip! macro. fn eval_packed_accumulate( lv: &CpuColumnsView

, nv: &CpuColumnsView

, @@ -118,6 +119,7 @@ pub fn eval_packed( eval_packed_init(lv, nv, yield_constr); } +#[allow(clippy::useless_conversion)] // For izip! macro. fn eval_ext_circuit_accumulate, const D: usize>( builder: &mut plonky2::plonk::circuit_builder::CircuitBuilder, lv: &CpuColumnsView>, diff --git a/evm/src/cpu/kernel/tests/bignum/mod.rs b/evm/src/cpu/kernel/tests/bignum/mod.rs index f7ba2206..9e15d96f 100644 --- a/evm/src/cpu/kernel/tests/bignum/mod.rs +++ b/evm/src/cpu/kernel/tests/bignum/mod.rs @@ -188,7 +188,7 @@ fn test_add_bignum(a: BigUint, b: BigUint, expected_output: BigUint) -> Result<( fn test_addmul_bignum(a: BigUint, b: BigUint, c: u128, expected_output: BigUint) -> Result<()> { let len = bignum_len(&a).max(bignum_len(&b)); let mut memory = pad_bignums(&[a, b], len); - memory.splice(len..len, vec![0.into(); 2].iter().cloned()); + memory.splice(len..len, [0.into(); 2].iter().cloned()); let a_start_loc = 0; let b_start_loc = len + 2; diff --git a/evm/src/cpu/memio.rs b/evm/src/cpu/memio.rs index 09490e87..d33fb66e 100644 --- a/evm/src/cpu/memio.rs +++ b/evm/src/cpu/memio.rs @@ -40,6 +40,7 @@ fn eval_packed_load( } } +#[allow(clippy::tuple_array_conversions)] // For izip! macro. fn eval_ext_circuit_load, const D: usize>( builder: &mut plonky2::plonk::circuit_builder::CircuitBuilder, lv: &CpuColumnsView>, @@ -109,6 +110,7 @@ fn eval_packed_store( } } +#[allow(clippy::tuple_array_conversions)] // For izip! macro. fn eval_ext_circuit_store, const D: usize>( builder: &mut plonky2::plonk::circuit_builder::CircuitBuilder, lv: &CpuColumnsView>, diff --git a/evm/src/cpu/stack.rs b/evm/src/cpu/stack.rs index 34e36b1e..54773b2b 100644 --- a/evm/src/cpu/stack.rs +++ b/evm/src/cpu/stack.rs @@ -187,6 +187,7 @@ fn eval_packed_one( } } +#[allow(clippy::useless_conversion)] // For izip! macro. pub fn eval_packed( lv: &CpuColumnsView

, yield_constr: &mut ConstraintConsumer

, @@ -301,6 +302,7 @@ fn eval_ext_circuit_one, const D: usize>( } } +#[allow(clippy::useless_conversion)] // For izip! macro. pub fn eval_ext_circuit, const D: usize>( builder: &mut plonky2::plonk::circuit_builder::CircuitBuilder, lv: &CpuColumnsView>, diff --git a/evm/src/recursive_verifier.rs b/evm/src/recursive_verifier.rs index 477d36c2..4d61aec2 100644 --- a/evm/src/recursive_verifier.rs +++ b/evm/src/recursive_verifier.rs @@ -188,7 +188,7 @@ where let circuit = buffer.read_circuit_data(gate_serializer, generator_serializer)?; let target_vec = buffer.read_target_vec()?; let init_challenger_state_target = - >::AlgebraicPermutation::new(target_vec.into_iter()); + >::AlgebraicPermutation::new(target_vec); let zero_target = buffer.read_target()?; let stark_proof_target = StarkProofTarget::from_buffer(buffer)?; let ctl_challenges_target = GrandProductChallengeSet::from_buffer(buffer)?; diff --git a/field/Cargo.toml b/field/Cargo.toml index afc084e8..0ec85af7 100644 --- a/field/Cargo.toml +++ b/field/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] anyhow = { version = "1.0.40", default-features = false } -itertools = { version = "0.10.0", default-features = false, features = ["use_alloc"] } +itertools = { version = "0.11.0", default-features = false, features = ["use_alloc"] } num = { version = "0.4", default-features = false, features = ["alloc", "rand"] } plonky2_util = { version = "0.1.0", default-features = false } rand = { version = "0.8.5", default-features = false, features = ["getrandom"] } diff --git a/plonky2/Cargo.toml b/plonky2/Cargo.toml index 39b95f21..c2e9f970 100644 --- a/plonky2/Cargo.toml +++ b/plonky2/Cargo.toml @@ -21,7 +21,7 @@ timing = ["std"] ahash = { version = "0.7.6", default-features = false, features = ["compile-time-rng"] } # NOTE: Be sure to keep this version the same as the dependency in `hashbrown`. anyhow = { version = "1.0.40", default-features = false } hashbrown = { version = "0.12.3", default-features = false, features = ["ahash", "serde"] } # NOTE: When upgrading, see `ahash` dependency. -itertools = { version = "0.10.0", default-features = false } +itertools = { version = "0.11.0", default-features = false } keccak-hash = { version = "0.8.0", default-features = false } log = { version = "0.4.14", default-features = false } plonky2_maybe_rayon = { version = "0.1.0", default-features = false } diff --git a/plonky2/src/fri/prover.rs b/plonky2/src/fri/prover.rs index 75747f62..a99bd874 100644 --- a/plonky2/src/fri/prover.rs +++ b/plonky2/src/fri/prover.rs @@ -136,7 +136,7 @@ fn fri_proof_of_work, C: GenericConfig, c // obtaining our duplex's post-state which contains the PoW response. let mut duplex_intermediate_state = challenger.sponge_state; let witness_input_pos = challenger.input_buffer.len(); - duplex_intermediate_state.set_from_iter(challenger.input_buffer.clone().into_iter(), 0); + duplex_intermediate_state.set_from_iter(challenger.input_buffer.clone(), 0); let pow_witness = (0..=F::NEG_ONE.to_canonical_u64()) .into_par_iter() diff --git a/plonky2/src/gates/selectors.rs b/plonky2/src/gates/selectors.rs index ef2dec81..2376729b 100644 --- a/plonky2/src/gates/selectors.rs +++ b/plonky2/src/gates/selectors.rs @@ -108,6 +108,7 @@ pub(crate) fn selector_ends_lookups, const D: usize /// k /// else /// UNUSED_SELECTOR +#[allow(clippy::single_range_in_vec_init)] // `groups` is a Vec of Ranges. pub(crate) fn selector_polynomials, const D: usize>( gates: &[GateRef], instances: &[GateInstance], diff --git a/plonky2/src/iop/challenger.rs b/plonky2/src/iop/challenger.rs index 06636d8a..f062dc6e 100644 --- a/plonky2/src/iop/challenger.rs +++ b/plonky2/src/iop/challenger.rs @@ -332,8 +332,8 @@ mod tests { // These are mostly arbitrary, but we want to test some rounds with enough inputs/outputs to // trigger multiple absorptions/squeezes. - let num_inputs_per_round = vec![2, 5, 3]; - let num_outputs_per_round = vec![1, 2, 4]; + let num_inputs_per_round = [2, 5, 3]; + let num_outputs_per_round = [1, 2, 4]; // Generate random input messages. let inputs_per_round: Vec> = num_inputs_per_round diff --git a/starky/Cargo.toml b/starky/Cargo.toml index e47184d7..c09ec5af 100644 --- a/starky/Cargo.toml +++ b/starky/Cargo.toml @@ -18,7 +18,7 @@ timing = ["plonky2/timing"] [dependencies] anyhow = { version = "1.0.40", default-features = false } -itertools = { version = "0.10.0", default-features = false } +itertools = { version = "0.11.0", default-features = false } log = { version = "0.4.14", default-features = false } plonky2_maybe_rayon = { version = "0.1.0", default-features = false } plonky2 = { version = "0.1.2", default-features = false }