sha256t: Remove standalone from_engine function
This function is meant to be used in conjunction with the `general_hash_type` macro but the `sha256t` module does not use that macro. Inline the function. Internal change only.
This commit is contained in:
parent
5ce8781162
commit
a0211906fe
|
@ -57,7 +57,9 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Produces a hash from the current state of a given engine.
|
/// Produces a hash from the current state of a given engine.
|
||||||
pub fn from_engine(e: HashEngine) -> Hash<T> { from_engine(e) }
|
pub fn from_engine(e: HashEngine) -> Hash<T> {
|
||||||
|
Hash::from_byte_array(sha256::Hash::from_engine(e).to_byte_array())
|
||||||
|
}
|
||||||
|
|
||||||
/// Constructs a new engine.
|
/// Constructs a new engine.
|
||||||
pub fn engine() -> HashEngine {
|
pub fn engine() -> HashEngine {
|
||||||
|
@ -135,13 +137,6 @@ impl<T: Tag> core::hash::Hash for Hash<T> {
|
||||||
|
|
||||||
crate::internal_macros::hash_trait_impls!(256, false, T: Tag);
|
crate::internal_macros::hash_trait_impls!(256, false, T: Tag);
|
||||||
|
|
||||||
fn from_engine<T>(e: sha256::HashEngine) -> Hash<T>
|
|
||||||
where
|
|
||||||
T: Tag,
|
|
||||||
{
|
|
||||||
Hash::from_byte_array(sha256::Hash::from_engine(e).to_byte_array())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Workaround macros being unavailable in attributes.
|
// Workaround macros being unavailable in attributes.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
|
Loading…
Reference in New Issue