mirror of https://github.com/status-im/evmc.git
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:
parent
b52a3dc81b
commit
98ad72ecd9
|
@ -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] }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue