From 98e53372ebfee0510520ea8f9a459664ae973854 Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 13 Mar 2020 18:10:01 +0100 Subject: [PATCH] Fix chunk count not being updated Amend: Update Version --- Cargo.toml | 2 +- src/io.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 424aae3..52b9e19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdflib" -version = "0.1.3" +version = "0.1.4" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/io.rs b/src/io.rs index e51d63d..83f994c 100644 --- a/src/io.rs +++ b/src/io.rs @@ -110,7 +110,7 @@ impl BDFWriter { return Err(Error::new(ErrorKind::Other, "the head has already been written")) } self.metadata.entries_per_chunk = number; - + self.metadata.chunk_count = (self.metadata.entry_count as f64 / number as f64).ceil() as u32; Ok(()) } }