Skip to content
Permalink
Browse files

add a way to create Hash with from()

  • Loading branch information...
vincenthz committed May 11, 2019
1 parent 5f057af commit 3a948cdb62263a724429e350445956b72c29867d
Showing with 6 additions and 0 deletions.
  1. +6 −0 chain-impl-mockchain/src/key.rs
@@ -202,6 +202,12 @@ impl Hash {
}
}

impl From<[u8; 32]> for Hash {
fn from(a: [u8; 32]) -> Self {
Hash::from_bytes(a)
}
}

impl property::Serialize for Hash {
type Error = std::io::Error;
fn serialize<W: std::io::Write>(&self, mut writer: W) -> Result<(), Self::Error> {

0 comments on commit 3a948cd

Please sign in to comment.
You can’t perform that action at this time.