"fix" clippy warnings

This commit is contained in:
Lireer 2022-01-25 20:42:51 +01:00
parent bb97711761
commit 35d8f04496
2 changed files with 3 additions and 2 deletions

View file

@ -95,7 +95,7 @@ impl<R: Read> AesReader<R> {
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::<Sha1>::new_varkey(hmac_key).unwrap();
Ok(Some(AesReaderValid {

View file

@ -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,