diff --git a/crates/batcher_types/src/batcher_types.rs b/crates/batcher_types/src/batcher_types.rs index 734eb19110..6929dc0208 100644 --- a/crates/batcher_types/src/batcher_types.rs +++ b/crates/batcher_types/src/batcher_types.rs @@ -2,7 +2,6 @@ use std::fmt::Debug; use blockifier::blockifier::block::BlockNumberHashPair; use chrono::prelude::*; -use derive_more::Display; use serde::{Deserialize, Serialize}; use starknet_api::block::BlockNumber; use starknet_api::core::StateDiffCommitment; @@ -22,7 +21,7 @@ use crate::errors::BatcherError; PartialOrd, Ord, Default, - Display, + derive_more::Display, Hash, )] pub struct ProposalId(pub u64); diff --git a/crates/blockifier/src/state/cached_state.rs b/crates/blockifier/src/state/cached_state.rs index b49e72ed32..cf0975c574 100644 --- a/crates/blockifier/src/state/cached_state.rs +++ b/crates/blockifier/src/state/cached_state.rs @@ -1,7 +1,6 @@ use std::cell::RefCell; use std::collections::{HashMap, HashSet}; -use derive_more::IntoIterator; use indexmap::IndexMap; use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce}; use starknet_api::state::StorageKey; @@ -294,7 +293,7 @@ impl Default for CachedState); /// Converts a `CachedState`'s storage mapping into a `StateDiff`'s storage mapping. diff --git a/crates/papyrus_network/src/sqmr/mod.rs b/crates/papyrus_network/src/sqmr/mod.rs index acff236122..7225e7a530 100644 --- a/crates/papyrus_network/src/sqmr/mod.rs +++ b/crates/papyrus_network/src/sqmr/mod.rs @@ -9,17 +9,16 @@ mod flow_test; use std::time::Duration; pub use behaviour::{Behaviour, ToOtherBehaviourEvent}; -use derive_more::Display; use libp2p::{PeerId, StreamProtocol}; pub type Bytes = Vec; -#[derive(Clone, Copy, Debug, Default, Display, Eq, Hash, PartialEq)] +#[derive(Clone, Copy, Debug, Default, derive_more::Display, Eq, Hash, PartialEq)] pub struct OutboundSessionId { pub value: usize, } -#[derive(Clone, Copy, Debug, Default, Display, Eq, Hash, PartialEq)] +#[derive(Clone, Copy, Debug, Default, derive_more::Display, Eq, Hash, PartialEq)] pub struct InboundSessionId { pub value: usize, } diff --git a/crates/papyrus_rpc/src/test_utils.rs b/crates/papyrus_rpc/src/test_utils.rs index f831bf06b1..d3c19e4fe2 100644 --- a/crates/papyrus_rpc/src/test_utils.rs +++ b/crates/papyrus_rpc/src/test_utils.rs @@ -1,7 +1,6 @@ use std::path::Path; use std::sync::Arc; -use derive_more::Display; use jsonrpsee::core::RpcResult; use jsonrpsee::server::RpcModule; use jsonrpsee::types::ErrorObjectOwned; @@ -137,7 +136,7 @@ pub fn validate_schema(schema: &JSONSchema, result: &Value) -> bool { result != &Value::Null && schema.is_valid(result) } -#[derive(Clone, Copy, Display, EnumIter)] +#[derive(Clone, Copy, derive_more::Display, EnumIter)] pub enum SpecFile { #[display(fmt = "starknet_api_openrpc.json")] StarknetApiOpenrpc, diff --git a/crates/starknet_api/src/block.rs b/crates/starknet_api/src/block.rs index c0ea73291b..29d77d1f0e 100644 --- a/crates/starknet_api/src/block.rs +++ b/crates/starknet_api/src/block.rs @@ -4,7 +4,6 @@ mod block_test; use std::fmt::Display; -use derive_more::Display; use itertools::Itertools; use serde::{Deserialize, Serialize}; use starknet_types_core::felt::Felt; @@ -239,7 +238,7 @@ pub enum BlockStatus { Serialize, PartialOrd, Ord, - Display, + derive_more::Display, )] pub struct BlockHash(pub StarkHash); @@ -248,7 +247,7 @@ pub struct BlockHash(pub StarkHash); Debug, Default, Copy, - Display, + derive_more::Display, Clone, Eq, PartialEq, diff --git a/crates/starknet_api/src/core.rs b/crates/starknet_api/src/core.rs index e48e8917d2..aa8ac76932 100644 --- a/crates/starknet_api/src/core.rs +++ b/crates/starknet_api/src/core.rs @@ -6,7 +6,6 @@ use core::fmt::Display; use std::fmt::Debug; use std::sync::LazyLock; -use derive_more::Display; use primitive_types::H160; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use starknet_types_core::felt::{Felt, NonZeroFelt}; @@ -97,7 +96,7 @@ pub const BLOCK_HASH_TABLE_ADDRESS: ContractAddress = ContractAddress(PatriciaKe Default, Copy, Clone, - Display, + derive_more::Display, Eq, PartialEq, Hash, @@ -177,7 +176,7 @@ pub fn calculate_contract_address( Serialize, PartialOrd, Ord, - Display, + derive_more::Display, derive_more::Deref, )] pub struct ClassHash(pub StarkHash); @@ -195,7 +194,7 @@ pub struct ClassHash(pub StarkHash); Serialize, PartialOrd, Ord, - Display, + derive_more::Display, )] pub struct CompiledClassHash(pub StarkHash); @@ -255,7 +254,7 @@ pub struct EntryPointSelector(pub StarkHash); Serialize, PartialOrd, Ord, - Display, + derive_more::Display, )] pub struct GlobalRoot(pub StarkHash); @@ -272,7 +271,7 @@ pub struct GlobalRoot(pub StarkHash); Serialize, PartialOrd, Ord, - Display, + derive_more::Display, )] pub struct TransactionCommitment(pub StarkHash); @@ -289,7 +288,7 @@ pub struct TransactionCommitment(pub StarkHash); Serialize, PartialOrd, Ord, - Display, + derive_more::Display, )] pub struct EventCommitment(pub StarkHash); @@ -306,7 +305,7 @@ pub struct EventCommitment(pub StarkHash); Serialize, PartialOrd, Ord, - Display, + derive_more::Display, )] pub struct ReceiptCommitment(pub StarkHash); @@ -320,7 +319,7 @@ pub struct StateDiffCommitment(pub PoseidonHash); #[derive( Copy, Clone, - Display, + derive_more::Display, Eq, PartialEq, Default, diff --git a/crates/starknet_api/src/transaction.rs b/crates/starknet_api/src/transaction.rs index 172b179349..928a92079e 100644 --- a/crates/starknet_api/src/transaction.rs +++ b/crates/starknet_api/src/transaction.rs @@ -2,7 +2,6 @@ use std::collections::BTreeMap; use std::fmt::Display; use std::sync::Arc; -use derive_more::{Display, From}; use num_bigint::BigUint; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use starknet_types_core::felt::Felt; @@ -394,7 +393,9 @@ impl TransactionHasher for DeployAccountTransactionV3 { } } -#[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord, From)] +#[derive( + Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord, derive_more::From, +)] pub enum DeployAccountTransaction { V1(DeployAccountTransactionV1), V3(DeployAccountTransactionV3), @@ -539,7 +540,9 @@ impl TransactionHasher for InvokeTransactionV3 { } } -#[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord, From)] +#[derive( + Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord, derive_more::From, +)] pub enum InvokeTransaction { V0(InvokeTransactionV0), V1(InvokeTransactionV1), @@ -729,7 +732,7 @@ pub struct RevertedTransactionExecutionStatus { Copy, Clone, Default, - Display, + derive_more::Display, Eq, PartialEq, Hash, @@ -997,7 +1000,7 @@ impl From for Felt { Copy, Debug, Deserialize, - Display, + derive_more::Display, EnumIter, Eq, Hash,