Skip to content

Implement is_zero method for U64HexOrNumber#478

Merged
mattsse merged 1 commit into
alloy-rs:mainfrom
tcoratger:U64HexOrNumber
Apr 7, 2024
Merged

Implement is_zero method for U64HexOrNumber#478
mattsse merged 1 commit into
alloy-rs:mainfrom
tcoratger:U64HexOrNumber

Conversation

@tcoratger

Copy link
Copy Markdown
Contributor

Solution

Implement is_zero method for U64HexOrNumber.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be useful when used in manual serde impls

@mattsse mattsse merged commit 89f14f9 into alloy-rs:main Apr 7, 2024
@prestwich

Copy link
Copy Markdown
Member

i believe this is redundant code, as ruint uints support deserializing from number without any typewrapping or decoration

serde helpers were not examined when porting from ethers so there have been a few redundant things 😅

@prestwich

Copy link
Copy Markdown
Member

@prestwich

Copy link
Copy Markdown
Member

on consideration, we might want to rename the helpers something like u64_via_ruint to clarify behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants