From a6af2e282c34610d6ef5a6f78681ead3e978982e Mon Sep 17 00:00:00 2001 From: Bogdan Opanchuk Date: Mon, 12 Apr 2021 21:48:36 -0700 Subject: [PATCH] Style fixes --- umbral-pre/src/hashing.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/umbral-pre/src/hashing.rs b/umbral-pre/src/hashing.rs index b0665e1f..33558691 100644 --- a/umbral-pre/src/hashing.rs +++ b/umbral-pre/src/hashing.rs @@ -30,12 +30,10 @@ pub fn unsafe_hash_to_point(dst: &[u8], data: &[u8]) -> Option { // We use an internal 32-bit counter as additional input let mut i = 0u32; while i < ::MAX { - let ibytes = (i as u32).to_be_bytes(); - let result = BytesDigest::new_with_dst(dst) .chain_bytes(&data_len) .chain_bytes(data) - .chain_bytes(&ibytes) + .chain_bytes(&i.to_be_bytes()) .finalize(); // Set the sign byte @@ -67,7 +65,7 @@ impl Hash { } pub fn chain_bytes>(self, bytes: T) -> Self { - Self(digest::Digest::chain(self.0, bytes.as_ref())) + Self(self.0.chain(bytes.as_ref())) } pub fn digest(self) -> Sha256 {