From 35d8f04496b9b5438aff22b04487a0f3f3235e69 Mon Sep 17 00:00:00 2001 From: Lireer Date: Tue, 25 Jan 2022 20:42:51 +0100 Subject: [PATCH] "fix" clippy warnings --- src/aes.rs | 2 +- src/read.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/aes.rs b/src/aes.rs index 4e8abff7..bbf30a8b 100644 --- a/src/aes.rs +++ b/src/aes.rs @@ -95,7 +95,7 @@ impl AesReader { return Ok(None); } - let cipher = cipher_from_mode(self.aes_mode, &decrypt_key); + let cipher = cipher_from_mode(self.aes_mode, decrypt_key); let hmac = Hmac::::new_varkey(hmac_key).unwrap(); Ok(Some(AesReaderValid { diff --git a/src/read.rs b/src/read.rs index eeff3808..e5a84c48 100644 --- a/src/read.rs +++ b/src/read.rs @@ -185,6 +185,7 @@ fn find_content<'a>( Ok((reader as &mut dyn Read).take(data.compressed_size)) } +#[allow(clippy::too_many_arguments)] fn make_crypto_reader<'a>( compression_method: crate::compression::CompressionMethod, crc32: u32, @@ -211,7 +212,7 @@ fn make_crypto_reader<'a>( } #[cfg(feature = "aes-crypto")] (Some(password), Some((aes_mode, vendor_version))) => { - match AesReader::new(reader, aes_mode, compressed_size).validate(&password)? { + match AesReader::new(reader, aes_mode, compressed_size).validate(password)? { None => return Ok(Err(InvalidPassword)), Some(r) => CryptoReader::Aes { reader: r,