diff --git a/hashes/src/sha256t.rs b/hashes/src/sha256t.rs index 20faa9e06..3619efe92 100644 --- a/hashes/src/sha256t.rs +++ b/hashes/src/sha256t.rs @@ -42,12 +42,6 @@ where unsafe { &mut *(bytes as *mut _ as *mut Self) } } - /// Constructs a new engine. - pub fn engine() -> HashEngine { T::engine() } - - /// Produces a hash from the current state of a given engine. - pub fn from_engine(e: HashEngine) -> Hash { from_engine(e) } - /// Copies a byte slice into a hash object. #[deprecated(since = "TBD", note = "Use `from_byte_array` instead.")] pub fn from_slice(sl: &[u8]) -> Result, FromSliceError> { @@ -60,6 +54,12 @@ where } } + /// Produces a hash from the current state of a given engine. + pub fn from_engine(e: HashEngine) -> Hash { from_engine(e) } + + /// Constructs a new engine. + pub fn engine() -> HashEngine { T::engine() } + /// Hashes some bytes. #[allow(clippy::self_named_constructors)] // Hash is a noun and a verb. pub fn hash(data: &[u8]) -> Self {