From a5c5bd5d6e5bd9672436488fe4aa6f586ae153b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Sat, 9 Nov 2024 01:19:27 +0100 Subject: [PATCH] Updating the crates `image` and `itertools` (#70) only minor code changes were necessary --- Cargo.toml | 4 ++-- src/dxb_writer.rs | 2 +- src/entity_iter.rs | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 785c3de..5f9556c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,8 +22,8 @@ byteorder = "1.3.4" chrono = { version= "0.4.19", features = ["serde"] } encoding_rs = "0.8.26" enum_primitive = "0.1.1" -image = "0.24" -itertools = "0.11" +image = "0.25.1" +itertools = "0.13.0" num = "0.4" serde = { version = "1.0", features = ["derive"], optional = true } uuid = { version = "1.3.3", features = ["serde", "v4"] } diff --git a/src/dxb_writer.rs b/src/dxb_writer.rs index 4e86ad5..d40bc68 100644 --- a/src/dxb_writer.rs +++ b/src/dxb_writer.rs @@ -45,7 +45,7 @@ impl DxbWriter { if writing_block { self.write_entities(&drawing.blocks().next().unwrap().entities)?; } else { - let groups = drawing.entities().group_by(|&e| e.common.layer.clone()); + let groups = drawing.entities().chunk_by(|&e| e.common.layer.clone()); for (layer, entities) in &groups { self.write_item_type(DxbItemType::NewLayer)?; self.write_null_terminated_string(&layer)?; diff --git a/src/entity_iter.rs b/src/entity_iter.rs index 432d036..fe44b83 100644 --- a/src/entity_iter.rs +++ b/src/entity_iter.rs @@ -39,7 +39,9 @@ where specific: EntityType::Seqend(_), .. }) => (), - Some(ent) => iter.put_back(ent), + Some(ent) => { + iter.put_back(ent); + } None => (), }