test: Fix unused imports by moving them inside the cfg-gated test

This commit is contained in:
Chris Hennick 2024-05-10 15:01:11 -07:00
parent 07caf646a0
commit be5836e14d
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -1,13 +1,12 @@
use std::env::temp_dir;
use std::io;
use zip::result::ZipResult;
use zip::ZipArchive;
#[cfg(all(unix, feature = "_deflate-any"))]
#[test]
fn repro_old423() -> ZipResult<()> {
fn repro_old423() -> zip::result::ZipResult<()> {
use std::env::temp_dir;
use std::io;
use zip::ZipArchive;
let mut v = Vec::new();
v.extend_from_slice(include_bytes!("data/lin-ub_iwd-v11.zip"));
let mut archive = ZipArchive::new(io::Cursor::new(v)).expect("couldn't open test zip file");
archive.extract(temp_dir())
}
}