Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove old deprecated items #1489

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading