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: support ParitalEq, Default, Hash on certain ffi types #342

Merged
merged 3 commits into from
Jul 3, 2019

Conversation

axic
Copy link
Member

@axic axic commented Jul 3, 2019

No description provided.

axic added 3 commits July 3, 2019 18:07
Could also force deriving in bindgen with (derive_partialeq(true)),
but that would insert it for complex structures we don't want it for,
such evmc_message and blacklisthing those is tedious and error prone
in case EVMC introduces new structures.
Same as with PartialEq: this may be done via bindgen in the future.
@axic axic merged commit bc55131 into master Jul 3, 2019
@axic axic deleted the rust-bindgen branch July 3, 2019 17:29
// TODO: with bindgen's interface improving these may be moved to
// bindgen configuration

impl PartialEq for evmc_address {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Implementing traits for bindgen-declared types is not the best approach IMO.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is explained in the comment above and the commit log.

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