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

rust: add type aliases for Address, Bytes32, Uint256 #343

Merged
merged 3 commits into from
Jul 4, 2019
Merged

Conversation

axic
Copy link
Member

@axic axic commented Jul 3, 2019

Part of #319.

Enums are handled in #206.

@axic
Copy link
Member Author

axic commented Jul 3, 2019

Need to squash this prior to merge.

@axic axic changed the title rust: add type aliases for Address, Bytes32, Uint256be rust: add type aliases for Address, Bytes32, Uint256 Jul 4, 2019
@axic axic merged commit 2f7a083 into master Jul 4, 2019
@axic axic deleted the rust-types branch July 4, 2019 19:04
Copy link
Collaborator

@jakelang jakelang left a comment

Choose a reason for hiding this comment

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

I prefer newtype notation, i.e. struct Address(ffi::evmc_address) as it is cleaner than implementing methods for types that have been declared by bindgen. This is ok though.

@axic
Copy link
Member Author

axic commented Jul 5, 2019

That was original version, but that requires from traits for conversion, IIRC.

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.

2 participants