Skip to content

Commit

Permalink
Merge pull request #29 from Pr0methean/master
Browse files Browse the repository at this point in the history
Replace zip with zip_next
  • Loading branch information
drager authored Jul 1, 2024
2 parents b32d7ea + 1e7b59c commit 559f005
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 62 deletions.
158 changes: 99 additions & 59 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ hex = "0.4"
is_executable = "0.1"
siphasher = "0.3"
tar = "0.4"
zip = "0.6"
zip_next = "1.0"

[dev-dependencies]
tempfile = "3.1"
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl Cache {
let mut binaries: HashSet<_> = binaries.iter().copied().collect();

let data = io::Cursor::new(zip);
let mut zip = zip::ZipArchive::new(data)?;
let mut zip = zip_next::ZipArchive::new(data)?;

for i in 0..zip.len() {
let mut entry = zip.by_index(i).unwrap();
Expand All @@ -286,7 +286,7 @@ impl Cache {
None => continue,
};

let dest = match self.extract_binary(entry_path, dst, &mut binaries) {
let dest = match self.extract_binary(&entry_path, dst, &mut binaries) {
Some(dest) => dest,
_ => continue,
};
Expand Down

0 comments on commit 559f005

Please sign in to comment.