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 unused EvmInstructionTables type alias #1123

Merged
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
5 changes: 1 addition & 4 deletions crates/revm/src/handler/register.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
use crate::{db::Database, handler::Handler, interpreter::opcode::InstructionTables, Evm};
use crate::{db::Database, handler::Handler, Evm};
use std::boxed::Box;

/// EVM Handler
pub type EvmHandler<'a, EXT, DB> = Handler<'a, Evm<'a, EXT, DB>, EXT, DB>;

/// EVM Instruction Tables
pub type EvmInstructionTables<'a, EXT, DB> = InstructionTables<'a, Evm<'a, EXT, DB>>;

// Handle register
pub type HandleRegister<'a, EXT, DB> = fn(&mut EvmHandler<'a, EXT, DB>);

Expand Down
12 changes: 6 additions & 6 deletions crates/revm/src/inspector/handler_register.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use core::cell::RefCell;

use crate::{
db::Database,
handler::register::{EvmHandler, EvmInstructionTables},
handler::register::EvmHandler,
interpreter::{opcode, opcode::BoxedInstruction, InstructionResult, Interpreter},
primitives::EVMError,
Evm, FrameOrResult, FrameResult, Inspector, JournalEntry,
};
use core::cell::RefCell;
use revm_interpreter::opcode::InstructionTables;
use std::{boxed::Box, rc::Rc, sync::Arc, vec::Vec};

/// Provides access to an `Inspector` instance.
Expand Down Expand Up @@ -41,11 +41,11 @@ pub fn inspector_handle_register<'a, DB: Database, EXT: GetInspector<DB>>(
.take()
.expect("Handler must have instruction table");
let mut table = match table {
EvmInstructionTables::Plain(table) => table
InstructionTables::Plain(table) => table
.into_iter()
.map(|i| inspector_instruction(i))
.collect::<Vec<_>>(),
EvmInstructionTables::Boxed(table) => table
InstructionTables::Boxed(table) => table
.into_iter()
.map(|i| inspector_instruction(i))
.collect::<Vec<_>>(),
Expand Down Expand Up @@ -123,7 +123,7 @@ pub fn inspector_handle_register<'a, DB: Database, EXT: GetInspector<DB>>(
}

// cast vector to array.
handler.instruction_table = Some(EvmInstructionTables::Boxed(
handler.instruction_table = Some(InstructionTables::Boxed(
table.try_into().unwrap_or_else(|_| unreachable!()),
));

Expand Down
Loading