From f0100e1c559ced3e60d91f449f4354be86a38a39 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 5 Sep 2024 12:23:00 +1000 Subject: [PATCH] Stop indexing hash types In preparation for removing `SliceIndex` from hash type impls (in `bitcoin_hashes`) lets stop indexing hash types here. Internal change only. --- src/secret.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/secret.rs b/src/secret.rs index beb0deb33..f5fc1060d 100644 --- a/src/secret.rs +++ b/src/secret.rs @@ -20,8 +20,8 @@ macro_rules! impl_display_secret { let mut engine = sha256::Hash::engine(); let tag_hash = sha256::Hash::hash(tag.as_bytes()); - engine.input(&tag_hash[..]); - engine.input(&tag_hash[..]); + engine.input(&tag_hash.as_ref()); + engine.input(&tag_hash.as_ref()); engine.input(&self.secret_bytes()); let hash = sha256::Hash::from_engine(engine);