Skip to content

Commit

Permalink
rustmft
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Aug 1, 2024
1 parent 6ea3a24 commit 3295afc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/eips/src/eip2930.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
//! [EIP-2930]: https://eips.ethereum.org/EIPS/eip-2930
#[cfg(not(feature = "std"))]
use alloc::{
vec::Vec,
string::String
};
use alloc::{string::String, vec::Vec};

use alloy_primitives::{Address, B256, U256};
use alloy_rlp::{RlpDecodable, RlpDecodableWrapper, RlpEncodable, RlpEncodableWrapper};
Expand All @@ -27,7 +24,7 @@ pub struct AccessListItem {
impl AccessListItem {
/// Calculates a heuristic for the in-memory size of the [AccessListItem].
#[inline]
pub fn size(&self) -> usize {
pub const fn size(&self) -> usize {
mem::size_of::<Address>() + self.storage_keys.capacity() * mem::size_of::<B256>()
}
}
Expand Down

0 comments on commit 3295afc

Please sign in to comment.