diff --git a/blake2/src/as_bytes.rs b/blake2/src/as_bytes.rs index c77fcd6d..8834e6a7 100644 --- a/blake2/src/as_bytes.rs +++ b/blake2/src/as_bytes.rs @@ -13,7 +13,6 @@ pub unsafe trait Safe {} pub trait AsBytes { fn as_bytes(&self) -> &[u8]; - fn as_mut_bytes(&mut self) -> &mut [u8]; } impl AsBytes for [T] { @@ -21,11 +20,6 @@ impl AsBytes for [T] { fn as_bytes(&self) -> &[u8] { unsafe { slice::from_raw_parts(self.as_ptr() as *const u8, mem::size_of_val(self)) } } - - #[inline] - fn as_mut_bytes(&mut self) -> &mut [u8] { - unsafe { slice::from_raw_parts_mut(self.as_mut_ptr() as *mut u8, mem::size_of_val(self)) } - } } unsafe impl Safe for u8 {}