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 => (), }