Implementing the PartialEq trait, and its permutations, for [u8; 32] and ContractId will allow for downstream comparisons that now have to go through the ContractId::to_bytes or ContractId::from_bytes functions to be much more concise and easy to read.
Possible Solution (optional)
impl PartialEq<[u8; 32]> for ContractId
impl PartialEq<ContractId> for [u8; 32] // if possible
// to consider
impl<'a, 'b> PartialEq<&'b [u8; 32]> for &'a ContractId
impl<'a> PartialEq<[u8; 32]> for &'a ContractId
// ...
Summary
Implementing the
PartialEq
trait, and its permutations, for[u8; 32]
andContractId
will allow for downstream comparisons that now have to go through theContractId::to_bytes
orContractId::from_bytes
functions to be much more concise and easy to read.Possible Solution (optional)