"fix" clippy warnings
This commit is contained in:
parent
bb97711761
commit
35d8f04496
2 changed files with 3 additions and 2 deletions
|
@ -95,7 +95,7 @@ impl<R: Read> AesReader<R> {
|
||||||
return Ok(None);
|
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();
|
let hmac = Hmac::<Sha1>::new_varkey(hmac_key).unwrap();
|
||||||
|
|
||||||
Ok(Some(AesReaderValid {
|
Ok(Some(AesReaderValid {
|
||||||
|
|
|
@ -185,6 +185,7 @@ fn find_content<'a>(
|
||||||
Ok((reader as &mut dyn Read).take(data.compressed_size))
|
Ok((reader as &mut dyn Read).take(data.compressed_size))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn make_crypto_reader<'a>(
|
fn make_crypto_reader<'a>(
|
||||||
compression_method: crate::compression::CompressionMethod,
|
compression_method: crate::compression::CompressionMethod,
|
||||||
crc32: u32,
|
crc32: u32,
|
||||||
|
@ -211,7 +212,7 @@ fn make_crypto_reader<'a>(
|
||||||
}
|
}
|
||||||
#[cfg(feature = "aes-crypto")]
|
#[cfg(feature = "aes-crypto")]
|
||||||
(Some(password), Some((aes_mode, vendor_version))) => {
|
(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)),
|
None => return Ok(Err(InvalidPassword)),
|
||||||
Some(r) => CryptoReader::Aes {
|
Some(r) => CryptoReader::Aes {
|
||||||
reader: r,
|
reader: r,
|
||||||
|
|
Loading…
Add table
Reference in a new issue