rust: implement PartialEq for evmc_address/evmc_bytes32
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.
#![allow(non_snake_case)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
+
+// TODO: with bindgen's interface improving these may be moved to
+// bindgen configuration
+
+impl PartialEq for evmc_address {
+ fn eq(&self, other: &Self) -> bool {
+ self.bytes == other.bytes
+ }
+}
+
+impl PartialEq for evmc_bytes32 {
+ fn eq(&self, other: &Self) -> bool {
+ self.bytes == other.bytes
+ }
+}
