Skip to content

Commit

Permalink
upgrade zip dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Jun 14, 2024
1 parent 6c91a0e commit 2a6b112
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 15 deletions.
57 changes: 46 additions & 11 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 @@ -64,7 +64,7 @@ font-awesome-as-a-crate = { path = "crates/font-awesome-as-a-crate" }
dashmap = "5.1.0"
string_cache = "0.8.0"
postgres-types = { version = "0.2", features = ["derive"] }
zip = {version = "0.6.2", default-features = false, features = ["bzip2"]}
zip = {version = "2.1.3", default-features = false, features = ["bzip2"]}
bzip2 = "0.4.4"
getrandom = "0.2.1"
itertools = { version = "0.12.0", optional = true}
Expand Down
4 changes: 2 additions & 2 deletions src/storage/archive_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub(crate) fn find_in_file<P: AsRef<Path> + std::fmt::Debug>(
mod tests {
use super::*;
use std::io::Write;
use zip::write::FileOptions;
use zip::write::SimpleFileOptions;

fn create_test_archive() -> fs::File {
let mut tf = tempfile::tempfile().unwrap();
Expand All @@ -128,7 +128,7 @@ mod tests {
archive
.start_file(
"testfile1",
FileOptions::default().compression_method(zip::CompressionMethod::Bzip2),
SimpleFileOptions::default().compression_method(zip::CompressionMethod::Bzip2),
)
.unwrap();
archive.write_all(&objectcontent).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ impl AsyncStorage {
let _span =
info_span!("create_zip_archive", %archive_path, root_dir=%root_dir.display()).entered();

let options = zip::write::FileOptions::default()
let options = zip::write::SimpleFileOptions::default()
.compression_method(zip::CompressionMethod::Bzip2);

let mut zip = zip::ZipWriter::new(io::Cursor::new(Vec::new()));
Expand Down

0 comments on commit 2a6b112

Please sign in to comment.