Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

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

Merged
axic merged 3 commits into
masterfrom
rust-types
Jul 4, 2019
Merged

rust: add type aliases for Address, Bytes32, Uint256#343
axic merged 3 commits into
masterfrom
rust-types

Conversation

@axic

@axicaxic commented Jul 3, 2019

Copy link
Copy Markdown
Member

Part of #319.

Enums are handled in #206.

Comment threadbindings/rust/evmc-vm/src/types.rs Outdated
@axic

axic commented Jul 3, 2019

Copy link
Copy Markdown
MemberAuthor

Need to squash this prior to merge.

@axic
axic requested a review from jakelangJuly 3, 2019 17:42
@axic
axicforce-pushed the rust-types branch 3 times, most recently from ba8a74e to d29218fCompareJuly 4, 2019 18:29
@axicaxic changed the title rust: add type aliases for Address, Bytes32, Uint256berust: add type aliases for Address, Bytes32, Uint256Jul 4, 2019
@axic
axic merged commit 2f7a083 into masterJul 4, 2019
@axic
axic deleted the rust-types branch July 4, 2019 19:04

@jakelangjakelang left a comment

Copy link
Copy Markdown
Contributor

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

axic commented Jul 5, 2019

Copy link
Copy Markdown
MemberAuthor

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

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@axic@jakelang