diff --git a/Cargo.toml b/Cargo.toml index 9bf0cc51..f80a4138 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ anyhow = ">= 1.0.38, < 2" base64 = ">= 0.21, < 0.23" bincode = "^1.3" bytes = ">= 1.0.1, < 2" -byte-unit = ">= 3.1.0, < 6.0.0" +byte-unit = ">= 5.1.6, < 6.0.0" clap = { version = ">= 4.1, < 5", default-features = false, features = ["std", "cargo", "derive", "error-context", "help", "suggestions", "usage", "wrap_help"] } clap_mangen = { version = "0.2", optional = true } cpio = ">= 0.2.1, < 0.5" diff --git a/docs/release-notes.md b/docs/release-notes.md index 11038e0f..d8824c5f 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -19,7 +19,7 @@ Internal changes: Packaging changes: - Update container to Fedora 41 - +- Require `byte-unit` ≥ 5.1.6 ## coreos-installer 0.23.0 (2024-11-12) diff --git a/src/download.rs b/src/download.rs index ac889585..14c49755 100644 --- a/src/download.rs +++ b/src/download.rs @@ -456,9 +456,9 @@ impl<'a, R: Read> ProgressReader<'a, R> { /// Format a size in bytes. fn format_bytes(count: u64) -> String { - Byte::from_bytes(count.into()) - .get_appropriate_unit(true) - .format(1) + Byte::from_u64(count) + .get_appropriate_unit(byte_unit::UnitType::Binary) + .to_string() } }