Skip to content

Commit 4e97829

Browse files
committed
Replace deprecated zip-extract with zip crate
zip-extract is unmaintained and zip >= 2.4 supports extraction natively via ZipArchive::extract(). Drops one dependency.
1 parent 6c043cc commit 4e97829

3 files changed

Lines changed: 8 additions & 19 deletions

File tree

src/stage4/Cargo.lock

Lines changed: 5 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/stage4/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ scraper = { version = "0.23.1" }
1212
tar = "0.4.44"
1313
futures-util = "0.3.25"
1414
async-compression = { version = "0.4.1", features = ["all"] }
15-
zip-extract = "0.4.0"
15+
zip = "4"
1616
serde = { version = "1.0.145", features = ["derive"] }
1717
serde_json = "1.0.103"
1818
serde_yaml = "0.9"

src/stage4/src/bloody_indiana_jones.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ impl BloodyIndianaJones {
186186
task::spawn_blocking(move || {
187187
create_dir_all(&path_string).expect("Unable to create download dir");
188188
let target_dir = PathBuf::from(&path_string);
189-
zip_extract::extract(File::open(file_path_string).unwrap(), &target_dir, true)
190-
.unwrap();
189+
let file = File::open(file_path_string).unwrap();
190+
zip::ZipArchive::new(file).unwrap().extract(&target_dir).unwrap();
191191
})
192192
.await
193193
.expect("Unable to unzip");

0 commit comments

Comments
 (0)