impl AsRef<Self> for primitives

This commit is contained in:
debris 2018-02-21 14:09:10 +01:00
parent 7e3a4fb4aa
commit 3eba48bc15
1 changed files with 7 additions and 0 deletions

View File

@ -51,6 +51,13 @@ macro_rules! construct_hash {
}
}
impl AsRef<$from> for $from {
#[inline]
fn as_ref(&self) -> &$from {
&self
}
}
impl ::core::ops::DerefMut for $from {
#[inline]
fn deref_mut(&mut self) -> &mut [u8] {