Merge pull request #29 from paritytech/asmut

Add `AsMut` impl in `construct_hash` macro.
This commit is contained in:
Toralf Wittner 2018-04-10 16:36:22 +02:00 committed by GitHub
commit c85f72a42c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {