From 6a1fee95dd9e0e8dad72df16509a87006dcd1c2d Mon Sep 17 00:00:00 2001 From: James Carl Date: Sat, 2 Mar 2024 03:20:47 -0500 Subject: [PATCH] Update ThreeMF to 0.5.0 --- Cargo.lock | 19 +++++-------------- crates/fj-export/Cargo.toml | 2 +- crates/fj-export/src/lib.rs | 3 ++- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ad2f5253f..779b34af2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2432,16 +2432,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" -[[package]] -name = "quick-xml" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "quick-xml" version = "0.31.0" @@ -2449,6 +2439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" dependencies = [ "memchr", + "serde", ] [[package]] @@ -3199,11 +3190,11 @@ dependencies = [ [[package]] name = "threemf" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf108acc769867300099b3c5334f3dd9bf8c420522a7b7a5938ba0142643808e" +checksum = "542e6ea27d8dc779b54b6325da4a52b97367f7a63a41f9c0ce67a3096e550123" dependencies = [ - "quick-xml 0.27.1", + "quick-xml", "serde", "thiserror", "zip", @@ -3787,7 +3778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" dependencies = [ "proc-macro2", - "quick-xml 0.31.0", + "quick-xml", "quote", ] diff --git a/crates/fj-export/Cargo.toml b/crates/fj-export/Cargo.toml index 348891e9e1..47a822d02f 100644 --- a/crates/fj-export/Cargo.toml +++ b/crates/fj-export/Cargo.toml @@ -17,6 +17,6 @@ workspace = true fj-interop.workspace = true fj-math.workspace = true thiserror = "1.0.57" -threemf = "0.4.0" +threemf = "0.5.0" stl = "0.2.1" wavefront_rs = "=2.0.0-beta.1" diff --git a/crates/fj-export/src/lib.rs b/crates/fj-export/src/lib.rs index d1fad06bc7..c59a24b664 100644 --- a/crates/fj-export/src/lib.rs +++ b/crates/fj-export/src/lib.rs @@ -66,7 +66,8 @@ fn export_3mf(mesh: &Mesh>, path: &Path) -> Result<(), Error> { }, }; - threemf::write(path, mesh)?; + let mut file = File::create(path)?; + threemf::write(&mut file, mesh)?; Ok(()) }