fix clippy warning and shorten links in tests
This commit is contained in:
parent
85bb91fb50
commit
2e06844429
2 changed files with 5 additions and 5 deletions
|
@ -167,7 +167,7 @@ impl<R: Read> Read for AesReaderValid<R> {
|
|||
// this.
|
||||
let hmac = std::mem::replace(
|
||||
&mut self.hmac,
|
||||
Hmac::new(&GenericArray::from_slice(
|
||||
Hmac::new(GenericArray::from_slice(
|
||||
&vec![0; <Hmac<Sha1> as KeySizeUser>::KeySize::to_usize()],
|
||||
)),
|
||||
);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue