From 1389fc6a85b221da994b897d1c5eb25a15e33e41 Mon Sep 17 00:00:00 2001 From: 448 OG Date: Fri, 5 Jan 2024 14:18:23 +0300 Subject: [PATCH] chore(lib): Implement fixes recommended by clippy --- src/encrypted_mem.rs | 7 +++---- src/zeroizable_arrays.rs | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/encrypted_mem.rs b/src/encrypted_mem.rs index 05905bd..a7b2f32 100644 --- a/src/encrypted_mem.rs +++ b/src/encrypted_mem.rs @@ -1,9 +1,8 @@ //! This module contains types and methods used to create a sealing key that stretches across multiple //! memory pages ensuring impossible key recovery if certain attacks are used to try and recover the key. //! These attacks are specified in the crate documentation. -//! -//! -//! +/// + #[cfg(all(feature = "symm_asymm", feature = "random"))] use crate::{CsprngArray, ZeroizeBytes}; use ascon_aead::Ascon128a; @@ -84,7 +83,7 @@ impl fmt::Debug for EncryptedMem { "ciphertext", &blake3::hash(self.ciphertext.expose_borrowed()), ) - .field("nonce", &blake3::hash(&self.nonce.as_ref())) + .field("nonce", &blake3::hash(self.nonce.as_ref())) .finish() } } diff --git a/src/zeroizable_arrays.rs b/src/zeroizable_arrays.rs index debac76..a246910 100644 --- a/src/zeroizable_arrays.rs +++ b/src/zeroizable_arrays.rs @@ -249,7 +249,6 @@ impl ZeroizeOnDrop for ZeroizeArray {} /// /// pub struct ZeroizeBytesArray(BytesMut); /// ``` -/// #[derive(BorshSerialize, BorshDeserialize)] pub struct ZeroizeBytesArray(BytesMut);