diff --git a/crates/katana/executor/tests/executor.rs b/crates/katana/executor/tests/executor.rs index fd365245ba..8521dee38f 100644 --- a/crates/katana/executor/tests/executor.rs +++ b/crates/katana/executor/tests/executor.rs @@ -55,11 +55,7 @@ fn test_executor_with_valid_blocks_impl( // ensure that all transactions succeeded, if not panic with the error message and tx index let has_failed = transactions.iter().enumerate().find_map(|(i, (_, res))| { - if let ExecutionResult::Failed { error } = res { - Some((i, error)) - } else { - None - } + if let ExecutionResult::Failed { error } = res { Some((i, error)) } else { None } }); if let Some((pos, error)) = has_failed { diff --git a/crates/katana/primitives/src/genesis/json.rs b/crates/katana/primitives/src/genesis/json.rs index c3948c096a..0add2eb9f5 100644 --- a/crates/katana/primitives/src/genesis/json.rs +++ b/crates/katana/primitives/src/genesis/json.rs @@ -1215,10 +1215,12 @@ mod tests { fn genesis_from_json_with_unresolved_paths() { let file = File::open("./src/genesis/test-genesis.json").unwrap(); let json: GenesisJson = serde_json::from_reader(file).unwrap(); - assert!(Genesis::try_from(json) - .unwrap_err() - .to_string() - .contains("Unresolved class artifact path")); + assert!( + Genesis::try_from(json) + .unwrap_err() + .to_string() + .contains("Unresolved class artifact path") + ); } #[test] @@ -1262,9 +1264,8 @@ mod tests { .expect("failed to load genesis file"); let res = Genesis::try_from(json); - assert!(res - .unwrap_err() - .to_string() - .contains(&format!("Class name '{name}' already exists"))) + assert!( + res.unwrap_err().to_string().contains(&format!("Class name '{name}' already exists")) + ) } } diff --git a/crates/katana/primitives/src/genesis/mod.rs b/crates/katana/primitives/src/genesis/mod.rs index 0efe077895..aa43ecaa4c 100644 --- a/crates/katana/primitives/src/genesis/mod.rs +++ b/crates/katana/primitives/src/genesis/mod.rs @@ -315,7 +315,8 @@ impl Default for Genesis { #[cfg(test)] mod tests { - use std::{collections::HashMap, str::FromStr}; + use std::collections::HashMap; + use std::str::FromStr; use allocation::GenesisAccount; use starknet::macros::felt; diff --git a/crates/katana/primitives/src/state.rs b/crates/katana/primitives/src/state.rs index 263bf77258..dc70a7805f 100644 --- a/crates/katana/primitives/src/state.rs +++ b/crates/katana/primitives/src/state.rs @@ -1,5 +1,4 @@ -use std::collections::BTreeMap; -use std::collections::BTreeSet; +use std::collections::{BTreeMap, BTreeSet}; use crate::class::{ClassHash, CompiledClass, CompiledClassHash, FlattenedSierraClass}; use crate::contract::{ContractAddress, Nonce, StorageKey, StorageValue}; @@ -20,7 +19,8 @@ pub struct StateUpdates { pub declared_classes: BTreeMap, /// A mapping of newly declared legacy class hashes. pub deprecated_declared_classes: BTreeSet, - /// A mapping of replaced contract addresses to their new class hashes ie using `replace_class` syscall. + /// A mapping of replaced contract addresses to their new class hashes ie using `replace_class` + /// syscall. pub replaced_classes: BTreeMap, }