Skip to content

Commit

Permalink
chore: remove old deprecated items (#1489)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Jun 6, 2024
1 parent 3ae8ff2 commit 22e15d3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 53 deletions.
7 changes: 0 additions & 7 deletions crates/interpreter/src/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ impl Gas {
self.limit - self.remaining
}

#[doc(hidden)]
#[inline]
#[deprecated(note = "use `spent` instead")]
pub const fn spend(&self) -> u64 {
self.spent()
}

/// Returns the amount of gas remaining.
#[inline]
pub const fn remaining(&self) -> u64 {
Expand Down
40 changes: 0 additions & 40 deletions crates/primitives/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,43 +103,3 @@ impl<T: DatabaseRef + DatabaseCommit> DatabaseCommit for WrapDatabaseRef<T> {
self.0.commit(changes)
}
}

/// Wraps a `dyn DatabaseRef` to provide a [`Database`] implementation.
#[doc(hidden)]
#[deprecated = "use `WrapDatabaseRef` instead"]
pub struct RefDBWrapper<'a, E> {
pub db: &'a dyn DatabaseRef<Error = E>,
}

#[allow(deprecated)]
impl<'a, E> RefDBWrapper<'a, E> {
#[inline]
pub fn new(db: &'a dyn DatabaseRef<Error = E>) -> Self {
Self { db }
}
}

#[allow(deprecated)]
impl<'a, E> Database for RefDBWrapper<'a, E> {
type Error = E;

#[inline]
fn basic(&mut self, address: Address) -> Result<Option<AccountInfo>, Self::Error> {
self.db.basic_ref(address)
}

#[inline]
fn code_by_hash(&mut self, code_hash: B256) -> Result<Bytecode, Self::Error> {
self.db.code_by_hash_ref(code_hash)
}

#[inline]
fn storage(&mut self, address: Address, index: U256) -> Result<U256, Self::Error> {
self.db.storage_ref(address, index)
}

#[inline]
fn block_hash(&mut self, number: U256) -> Result<B256, Self::Error> {
self.db.block_hash_ref(number)
}
}
6 changes: 0 additions & 6 deletions crates/revm/src/db/emptydb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ impl<E> EmptyDBTyped<E> {
_phantom: PhantomData,
}
}

#[doc(hidden)]
#[deprecated = "use `new` instead"]
pub fn new_keccak_block_hash() -> Self {
Self::new()
}
}

impl<E> Database for EmptyDBTyped<E> {
Expand Down

0 comments on commit 22e15d3

Please sign in to comment.