Add AsRef<u8> for Multihash. (#1161)

* Add AsRef<u8> for Multihash.

* Bump patch version of multihash.
This commit is contained in:
Roman Borschel
2019-06-05 10:27:06 +02:00
committed by Pierre Krieger
parent f51573b628
commit a2550215a0
2 changed files with 7 additions and 1 deletions

View File

@ -158,6 +158,12 @@ impl Multihash {
}
}
impl AsRef<[u8]> for Multihash {
fn as_ref(&self) -> &[u8] {
self.as_bytes()
}
}
impl<'a> PartialEq<MultihashRef<'a>> for Multihash {
#[inline]
fn eq(&self, other: &MultihashRef<'a>) -> bool {