From 262089c6abf9c18c9220ffd884372a9cd3b3083f Mon Sep 17 00:00:00 2001 From: Joseph Zhao <65984904+programskillforverification@users.noreply.github.com> Date: Sat, 28 Dec 2024 19:38:22 +0800 Subject: [PATCH] [Feature] update Display implementation on BlockNumberOrTag (#1857) * remove number * fix test --- crates/eips/src/eip1898.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/eips/src/eip1898.rs b/crates/eips/src/eip1898.rs index 06ebebb0d68..6b6205f7645 100644 --- a/crates/eips/src/eip1898.rs +++ b/crates/eips/src/eip1898.rs @@ -216,7 +216,7 @@ impl FromStr for BlockNumberOrTag { impl fmt::Display for BlockNumberOrTag { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { - Self::Number(x) => write!(f, "number 0x{x:x}"), + Self::Number(x) => write!(f, "0x{x:x}"), Self::Latest => f.pad("latest"), Self::Finalized => f.pad("finalized"), Self::Safe => f.pad("safe"), @@ -996,7 +996,7 @@ mod tests { let id = BlockId::number(100000); - assert_eq!(id.to_string(), "number 0x186a0"); + assert_eq!(id.to_string(), "0x186a0"); let id = BlockId::latest();