Skip to content

Commit

Permalink
chore: remove unused generics from TracerEip3155 (bluealloy#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr authored Feb 18, 2025
1 parent 6662e10 commit cd6ebd8
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions crates/inspector/src/eip3155.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use state::bytecode::opcode::OpCode;
use std::io::Write;

/// [EIP-3155](https://eips.ethereum.org/EIPS/eip-3155) tracer [Inspector].
pub struct TracerEip3155<CTX, INTR> {
pub struct TracerEip3155 {
output: Box<dyn Write>,
gas_inspector: GasInspector,
/// Print summary of the execution.
Expand All @@ -28,7 +28,6 @@ pub struct TracerEip3155<CTX, INTR> {
skip: bool,
include_memory: bool,
memory: Option<String>,
_phantom: core::marker::PhantomData<(CTX, INTR)>,
}

// # Output
Expand Down Expand Up @@ -108,11 +107,7 @@ struct Summary {
fork: Option<String>,
}

impl<CTX, INTR> TracerEip3155<CTX, INTR>
where
CTX: ContextTr,
INTR:,
{
impl TracerEip3155 {
/// Creates a new EIP-3155 tracer with the given output writer, by first wrapping it in a
/// [`BufWriter`](std::io::BufWriter).
pub fn buffered(output: impl Write + 'static) -> Self {
Expand All @@ -136,7 +131,6 @@ where
refunded: 0,
mem_size: 0,
skip: false,
_phantom: Default::default(),
}
}

Expand Down Expand Up @@ -182,7 +176,7 @@ where
*skip = false;
}

fn print_summary(&mut self, result: &InterpreterResult, context: &mut CTX) {
fn print_summary(&mut self, result: &InterpreterResult, context: &mut impl ContextTr) {
if !self.print_summary {
return;
}
Expand Down Expand Up @@ -214,7 +208,7 @@ impl CloneStack for Stack {
}
}

impl<CTX, INTR> Inspector<CTX, INTR> for TracerEip3155<CTX, INTR>
impl<CTX, INTR> Inspector<CTX, INTR> for TracerEip3155
where
CTX: ContextTr,
INTR: InterpreterTypes<Stack: StackTr + CloneStack>,
Expand Down

0 comments on commit cd6ebd8

Please sign in to comment.