From 94675c55a258f94829beeb02356551ae05f6858b Mon Sep 17 00:00:00 2001 From: Ammar Arif Date: Wed, 15 May 2024 10:26:20 -0400 Subject: [PATCH] clippy + fmt --- crates/katana/executor/benches/execution.rs | 10 ++++------ crates/katana/executor/benches/utils.rs | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/katana/executor/benches/execution.rs b/crates/katana/executor/benches/execution.rs index bc1ba171db..33d515fb00 100644 --- a/crates/katana/executor/benches/execution.rs +++ b/crates/katana/executor/benches/execution.rs @@ -6,7 +6,8 @@ use criterion::{criterion_group, criterion_main, BatchSize, BenchmarkGroup, Crit use katana_executor::{SimulationFlag, StateProviderDb}; use katana_primitives::env::{BlockEnv, CfgEnv}; use katana_primitives::transaction::ExecutableTxWithHash; -use katana_provider::{test_utils, traits::state::StateFactoryProvider}; +use katana_provider::test_utils; +use katana_provider::traits::state::StateFactoryProvider; use pprof::criterion::{Output, PProfProfiler}; use crate::utils::{envs, tx}; @@ -35,8 +36,7 @@ fn blockifier( ) where SF: StateFactoryProvider, { - use katana_executor::implementation::blockifier::utils::block_context_from_envs; - use katana_executor::implementation::blockifier::utils::transact; + use katana_executor::implementation::blockifier::utils::{block_context_from_envs, transact}; // convert to blockifier block context let block_context = block_context_from_envs(&block_envs.0, &block_envs.1); @@ -54,9 +54,7 @@ fn blockifier( (state, &block_context, &execution_flags, tx.clone()) }, - |(mut state, block_context, flags, tx)| { - transact(&mut state, &block_context, &flags, tx) - }, + |(mut state, block_context, flags, tx)| transact(&mut state, block_context, flags, tx), BatchSize::SmallInput, ) }); diff --git a/crates/katana/executor/benches/utils.rs b/crates/katana/executor/benches/utils.rs index a3d88555f2..b06d8bb83d 100644 --- a/crates/katana/executor/benches/utils.rs +++ b/crates/katana/executor/benches/utils.rs @@ -7,8 +7,9 @@ use cairo_vm::vm::runners::builtin_runner::{ }; use katana_primitives::block::GasPrices; use katana_primitives::env::{BlockEnv, CfgEnv, FeeTokenAddressses}; +use katana_primitives::genesis::constant::DEFAULT_FEE_TOKEN_ADDRESS; use katana_primitives::transaction::{ExecutableTxWithHash, InvokeTx, InvokeTxV1}; -use katana_primitives::{genesis::constant::DEFAULT_FEE_TOKEN_ADDRESS, FieldElement}; +use katana_primitives::FieldElement; use starknet::macros::{felt, selector}; pub fn tx() -> ExecutableTxWithHash {