File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,6 @@ macro_rules! blake2_impl {
4444 use std:: cmp;
4545 use std:: fmt:: { self , Debug } ;
4646 use std:: io;
47- use std:: mem;
48- use std:: slice;
4947
5048 use $crate:: as_bytes:: AsBytes ;
5149 use $crate:: bytes:: { MutableByteVector , copy_memory} ;
@@ -64,18 +62,9 @@ macro_rules! blake2_impl {
6462 }
6563
6664 impl $result {
67- #[ inline]
68- fn as_slice( & self ) -> & [ u8 ] {
69- unsafe {
70- slice:: from_raw_parts(
71- self . h. as_ptr( ) as * const u8 ,
72- mem:: size_of_val( & self . h) )
73- }
74- }
75-
7665 /// Returns the contained hash result as a byte string.
7766 #[ inline]
78- pub fn as_bytes( & self ) -> & [ u8 ] { & self . as_slice ( ) [ ..self . nn] }
67+ pub fn as_bytes( & self ) -> & [ u8 ] { & self . h . as_bytes ( ) [ ..self . nn] }
7968
8069 /// Returns the length of the hash result.
8170 ///
You can’t perform that action at this time.
0 commit comments