From d886fe55a6054db10deedc71eadbed550e1cbeb0 Mon Sep 17 00:00:00 2001 From: Preston Evans <32944016+preston-evans98@users.noreply.github.com> Date: Thu, 26 Oct 2023 08:45:17 -0700 Subject: [PATCH] Prevent panics in NamespacedHash.set_hash (#19) --- src/namespaced_hash.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/namespaced_hash.rs b/src/namespaced_hash.rs index 2b50bbb..d9eab66 100644 --- a/src/namespaced_hash.rs +++ b/src/namespaced_hash.rs @@ -295,7 +295,7 @@ impl NamespacedHash { self.hash } - fn set_hash(&mut self, new_hash: &[u8]) { + fn set_hash(&mut self, new_hash: &[u8; HASH_LEN]) { self.hash.copy_from_slice(new_hash) }