Skip to content

Commit

Permalink
chore: ⬆️升级 zip 0.6 -> 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LycasLdt committed Apr 27, 2024
1 parent 5d8950c commit c7dbaef
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 47 deletions.
150 changes: 109 additions & 41 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 @@ -28,7 +28,7 @@ md-5 = "0.11.0-pre.3"
chrono = "0.4"
base16ct = { version = "0.2", features = ["alloc"] }
aes = "0.8"
zip = { version = "0.6", features = ["deflate"]}
zip = { version = "1.1", features = ["deflate"]}
cbc = { version = "0.1", features = ["std"] }
percent-encoding = "2.3"

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<div align="center">

# :dog:

## Rabdog
## :dog: Rabdog
</div>

简简单单,获取个 **Scratch社区作品**
Expand Down
4 changes: 2 additions & 2 deletions src/utils/sb3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::io::{Cursor, Read, Seek, Write};

use anyhow::{Ok, Result};
use serde::Deserialize;
use zip::{write::FileOptions, ZipArchive, ZipWriter};
use zip::{write::SimpleFileOptions, ZipArchive, ZipWriter};

#[derive(Deserialize)]
pub struct Sb3Project {
Expand Down Expand Up @@ -81,7 +81,7 @@ impl<W: Write + Seek> Sb3Writer<W> {
}
pub fn add_asset(&mut self, name: &str, buf: &[u8]) -> Result<&mut Self> {
let inner = &mut self.0;
inner.start_file(name, FileOptions::default())?;
inner.start_file(name, SimpleFileOptions::default())?;
inner.write_all(buf)?;

Ok(self)
Expand Down

0 comments on commit c7dbaef

Please sign in to comment.