forked from 1b-agent/fieldcraft-upstream
build(deps): upgrade zip 3 → 9
Bump the zip crate from 3 to 9 in the workspace Cargo.toml and adapt to the API change in 2.0+: last_modified_time now takes Option<DateTime> instead of DateTime directly. - crates/io/src/lib.rs: wrap DateTime::default() in Some(...) - crates/geometry/src/tagged_mesh.rs: same fix in the 3MF writer Closes #134
This commit is contained in:
1 parent
a6f1a6dbeb
commit
8e28283dad
3 files changed
+4
-4
No files matched your search
+2
-2
@@ -35,8 +35,8 @@ serde = { version = "1", features = ["derive"] }
|
||||
serde_json = { version = "1", features = ["float_roundtrip"] }
|
||||
log = "0.4"
|
||||
|
||||
# 3MF packages (docs/formats/tagged-mesh.md).
|
||||
zip = { version = "3", default-features = false, features = ["deflate"] }
|
||||
# 3MF packages (docs/formats/tagged-mesh.md). zip is ahead of SolidCraft (still on 3), so both are built.
|
||||
zip = { version = "9", default-features = false, features = ["deflate"] }
|
||||
quick-xml = "0.42"
|
||||
|
||||
# content hashes and part checksums of .fieldcraft files (the version SolidCraft uses)
|
||||
|
||||
@@ -446,7 +446,7 @@ mod tests {
|
||||
for (name, data) in [("[Content_Types].xml", types), ("_rels/.rels", rels), ("3D/3dmodel.model", x.as_str())] {
|
||||
let o = zip::write::SimpleFileOptions::default()
|
||||
.compression_method(zip::CompressionMethod::Deflated)
|
||||
.last_modified_time(zip::DateTime::default());
|
||||
.last_modified_time(Some(zip::DateTime::default()));
|
||||
zip.start_file(name, o).unwrap();
|
||||
zip.write_all(data.as_bytes()).unwrap();
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ pub fn write(model: &Model, geometry: &Geometry, journal: &[JournalEntry], view:
|
||||
// Fixed time and permissions: the bytes depend on the model only.
|
||||
let options = zip::write::SimpleFileOptions::default()
|
||||
.compression_method(zip::CompressionMethod::Stored)
|
||||
.last_modified_time(zip::DateTime::default())
|
||||
.last_modified_time(Some(zip::DateTime::default()))
|
||||
.unix_permissions(0o644)
|
||||
.large_file(bytes.len() as u64 >= u64::from(u32::MAX));
|
||||
zip.start_file(name, options).map_err(zip_error)?;
|
||||
|
||||
Reference in new issue
Block a user