From f4116f2c20dac8cfaa64c2b51ff0950913dcae24 Mon Sep 17 00:00:00 2001 From: Emil Engler Date: Thu, 25 Apr 2024 11:03:48 +0200 Subject: [PATCH] ciphers: Remove redundant mutability --- ciphers/src/subtle/blake2b.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ciphers/src/subtle/blake2b.rs b/ciphers/src/subtle/blake2b.rs index 4f8933d..2d5b6a4 100644 --- a/ciphers/src/subtle/blake2b.rs +++ b/ciphers/src/subtle/blake2b.rs @@ -33,8 +33,8 @@ pub fn hash<'a>(key: &'a [u8], data: &'a [u8]) -> impl To<[u8], anyhow::Result<( // out the right way to use the imports while allowing for zeroization. // An API based on slices might actually be simpler. let mut tmp = Zeroizing::new([0u8; OUT_LEN]); - let mut tmp = GenericArray::from_mut_slice(tmp.as_mut()); - h.finalize_into(&mut tmp); + let tmp = GenericArray::from_mut_slice(tmp.as_mut()); + h.finalize_into(tmp); copy_slice(tmp.as_ref()).to(out); Ok(())