diff --git a/src/core/utils/hash/sha256.rs b/src/core/utils/hash/sha256.rs index 454e92bf3..0db09a7e8 100644 --- a/src/core/utils/hash/sha256.rs +++ b/src/core/utils/hash/sha256.rs @@ -19,9 +19,7 @@ where } } - ctx.finalize() - .try_into() - .expect("failed to return Digest buffer") + ctx.finalize().into() } /// Sha256 hash (input gather) @@ -38,8 +36,7 @@ where ctx }) .finalize() - .try_into() - .expect("failed to return Digest buffer") + .into() } /// Sha256 hash @@ -50,7 +47,5 @@ pub fn hash(input: T) -> DigestOut where T: AsRef<[u8]>, { - Sha256::digest(input) - .try_into() - .expect("failed to return Digest buffer") + Sha256::digest(input).into() }