From 2e0684442978a96f0b5c35dc4025058df94c5cc7 Mon Sep 17 00:00:00 2001 From: Lireer Date: Wed, 26 Jan 2022 14:53:19 +0100 Subject: [PATCH] fix clippy warning and shorten links in tests --- src/aes.rs | 2 +- tests/aes_encryption.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/aes.rs b/src/aes.rs index fc65577a..5f943571 100644 --- a/src/aes.rs +++ b/src/aes.rs @@ -167,7 +167,7 @@ impl Read for AesReaderValid { // this. let hmac = std::mem::replace( &mut self.hmac, - Hmac::new(&GenericArray::from_slice( + Hmac::new(GenericArray::from_slice( &vec![0; as KeySizeUser>::KeySize::to_usize()], )), ); diff --git a/tests/aes_encryption.rs b/tests/aes_encryption.rs index 84099d76..f3c6310d 100644 --- a/tests/aes_encryption.rs +++ b/tests/aes_encryption.rs @@ -8,7 +8,7 @@ const PASSWORD: &[u8] = b"helloworld"; #[test] fn aes256_encrypted_uncompressed_file() { let mut v = Vec::new(); - v.extend_from_slice(include_bytes!("../tests/data/aes_archive.zip")); + v.extend_from_slice(include_bytes!("data/aes_archive.zip")); let mut archive = ZipArchive::new(io::Cursor::new(v)).expect("couldn't open test zip file"); let mut file = archive @@ -26,7 +26,7 @@ fn aes256_encrypted_uncompressed_file() { #[test] fn aes256_encrypted_file() { let mut v = Vec::new(); - v.extend_from_slice(include_bytes!("../tests/data/aes_archive.zip")); + v.extend_from_slice(include_bytes!("data/aes_archive.zip")); let mut archive = ZipArchive::new(io::Cursor::new(v)).expect("couldn't open test zip file"); let mut file = archive @@ -44,7 +44,7 @@ fn aes256_encrypted_file() { #[test] fn aes192_encrypted_file() { let mut v = Vec::new(); - v.extend_from_slice(include_bytes!("../tests/data/aes_archive.zip")); + v.extend_from_slice(include_bytes!("data/aes_archive.zip")); let mut archive = ZipArchive::new(io::Cursor::new(v)).expect("couldn't open test zip file"); let mut file = archive @@ -62,7 +62,7 @@ fn aes192_encrypted_file() { #[test] fn aes128_encrypted_file() { let mut v = Vec::new(); - v.extend_from_slice(include_bytes!("../tests/data/aes_archive.zip")); + v.extend_from_slice(include_bytes!("data/aes_archive.zip")); let mut archive = ZipArchive::new(io::Cursor::new(v)).expect("couldn't open test zip file"); let mut file = archive