mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
Add AsRef<u8> for Multihash. (#1161)
* Add AsRef<u8> for Multihash. * Bump patch version of multihash.
This commit is contained in:
committed by
Pierre Krieger
parent
f51573b628
commit
a2550215a0
@ -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 {
|
||||
|
Reference in New Issue
Block a user