rust: implement Default for evmc_address/evmc_bytes32

Same as with PartialEq: this may be done via bindgen in the future.
This commit is contained in:
Alex Beregszaszi 2019-07-03 18:06:35 +01:00
parent b52a3dc81b
commit 98ad72ecd9
1 changed files with 12 additions and 0 deletions

View File

@ -23,3 +23,15 @@ impl PartialEq for evmc_bytes32 {
self.bytes == other.bytes
}
}
impl Default for evmc_address {
fn default() -> Self {
evmc_address { bytes: [0u8; 20] }
}
}
impl Default for evmc_bytes32 {
fn default() -> Self {
evmc_bytes32 { bytes: [0u8; 32] }
}
}