From 4eba55cb7a28b89e208ad6b22378000b238f4906 Mon Sep 17 00:00:00 2001 From: Marli Frost <marli@frost.red> Date: Wed, 19 Aug 2020 13:59:48 +0100 Subject: [PATCH] refactor: use deprecated API in tests --- examples/extract.rs | 1 + examples/file_info.rs | 1 + tests/zip64_large.rs | 1 + tests/zip_crypto.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/examples/extract.rs b/examples/extract.rs index 83ecebaf..fcd23e3a 100644 --- a/examples/extract.rs +++ b/examples/extract.rs @@ -18,6 +18,7 @@ fn real_main() -> i32 { for i in 0..archive.len() { let mut file = archive.by_index(i).unwrap(); + #[allow(deprecated)] let outpath = file.sanitized_name(); { diff --git a/examples/file_info.rs b/examples/file_info.rs index c02cda48..bed1b818 100644 --- a/examples/file_info.rs +++ b/examples/file_info.rs @@ -19,6 +19,7 @@ fn real_main() -> i32 { for i in 0..archive.len() { let file = archive.by_index(i).unwrap(); + #[allow(deprecated)] let outpath = file.sanitized_name(); { diff --git a/tests/zip64_large.rs b/tests/zip64_large.rs index 738a8beb..c4b5a6b4 100644 --- a/tests/zip64_large.rs +++ b/tests/zip64_large.rs @@ -195,6 +195,7 @@ fn zip64_large() { for i in 0..archive.len() { let mut file = archive.by_index(i).unwrap(); + #[allow(deprecated)] let outpath = file.sanitized_name(); println!( "Entry {} has name \"{}\" ({} bytes)", diff --git a/tests/zip_crypto.rs b/tests/zip_crypto.rs index da137cec..9b527bd1 100644 --- a/tests/zip_crypto.rs +++ b/tests/zip_crypto.rs @@ -70,6 +70,7 @@ fn encrypted_file() { { // Correct password, read contents let mut file = archive.by_index_decrypt(0, "test".as_bytes()).unwrap(); + #[allow(deprecated)] let file_name = file.sanitized_name(); assert_eq!(file_name, std::path::PathBuf::from("test.txt"));