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

[Feature] update Display implementation on BlockNumberOrTag #1857

Merged
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
4 changes: 2 additions & 2 deletions crates/eips/src/eip1898.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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();

Expand Down
Loading