Skip to content

Commit

Permalink
Update zip requirement from 0.6.2 to 1.1.1
Browse files Browse the repository at this point in the history
---
updated-dependencies:
- dependency-name: zip
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and Brian Li committed Apr 23, 2024
1 parent d345f2b commit c1b7af0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tsar-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protobuf = "3.1.0"
sha1 = "0.10.1"
smallvec = "1.9.0"
thiserror = "1.0.31"
zip = { version = "0.6.2", default-features = false, features = ["deflate"] }
zip = { version = "1.1.1", default-features = false, features = ["deflate"] }
zstd = "0.13.0"

[target.'cfg(windows)'.dependencies]
Expand Down
8 changes: 4 additions & 4 deletions tsar-rs/src/write/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
use base64::Engine;
use protobuf::{CodedOutputStream, EnumOrUnknown, Message};
use sha1::{Digest, Sha1};
use zip::write::FileOptions;
use zip::write::SimpleFileOptions;

use crate::{compress, paths, pb, result::Result, DataType};

Expand Down Expand Up @@ -40,7 +40,7 @@ impl<W: Write + Seek> Builder<W> {
pub fn add_file(&mut self, name: impl Into<String>, mut reader: impl Read) -> Result<()> {
let name = name.into();
self.z
.start_file(name.clone(), FileOptions::default().large_file(true))?;
.start_file(name.clone(), SimpleFileOptions::default().large_file(true))?;
std::io::copy(&mut reader, &mut self.z)?;
self.meta.raw_files.push(pb::RawFile {
name,
Expand Down Expand Up @@ -114,7 +114,7 @@ impl<W: Write + Seek> Builder<W> {

pub fn finish(&mut self) -> Result<()> {
self.z
.start_file(paths::BUNDLE_META_PATH, FileOptions::default())?;
.start_file(paths::BUNDLE_META_PATH, SimpleFileOptions::default())?;
self.meta.blobs.sort_by(|a, b| a.name.cmp(&b.name));
// TODO check target_file contiguous
self.meta
Expand All @@ -135,7 +135,7 @@ impl<W: Write + Seek> Builder<W> {
if !self.chunks.contains(&result) {
self.z.start_file(
paths::chunk_path(&result),
FileOptions::default()
SimpleFileOptions::default()
.compression_method(if blob.compression_stages.is_empty() {
// use zip compression when no custom compression stage
zip::CompressionMethod::DEFLATE
Expand Down

0 comments on commit c1b7af0

Please sign in to comment.