Add `AsMut` impl in `construct_hash` macro.

This commit is contained in:
Toralf Wittner 2018-04-10 16:02:09 +02:00
parent 8820f960ab
commit f3c2617510
1 changed files with 7 additions and 0 deletions

View File

@ -51,6 +51,13 @@ macro_rules! construct_hash {
}
}
impl AsMut<[u8]> for $from {
#[inline]
fn as_mut(&mut self) -> &mut [u8] {
&mut self.0
}
}
impl AsRef<$from> for $from {
#[inline]
fn as_ref(&self) -> &$from {