diff --git a/crates/eips/src/eip2930.rs b/crates/eips/src/eip2930.rs index 182cb37b10c2..0a34d4ef43bb 100644 --- a/crates/eips/src/eip2930.rs +++ b/crates/eips/src/eip2930.rs @@ -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}; @@ -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::
() + self.storage_keys.capacity() * mem::size_of::() } }