Skip to content

Commit 68198d0

Browse files
committed
cargo: require byte-unit 5.1.6 or greater
1 parent f44ef36 commit 68198d0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ anyhow = ">= 1.0.38, < 2"
5151
base64 = ">= 0.21, < 0.23"
5252
bincode = "^1.3"
5353
bytes = ">= 1.0.1, < 2"
54-
byte-unit = ">= 3.1.0, < 6.0.0"
54+
byte-unit = ">= 5.1.6, < 6.0.0"
5555
clap = { version = ">= 4.1, < 5", default-features = false, features = ["std", "cargo", "derive", "error-context", "help", "suggestions", "usage", "wrap_help"] }
5656
clap_mangen = { version = "0.2", optional = true }
5757
cpio = ">= 0.2.1, < 0.5"

docs/release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Internal changes:
1919
Packaging changes:
2020

2121
- Update container to Fedora 41
22-
22+
- Require `byte-unit` ≥ 5.1.6
2323

2424
## coreos-installer 0.23.0 (2024-11-12)
2525

src/download.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ impl<'a, R: Read> ProgressReader<'a, R> {
456456

457457
/// Format a size in bytes.
458458
fn format_bytes(count: u64) -> String {
459-
Byte::from_bytes(count.into())
460-
.get_appropriate_unit(true)
461-
.format(1)
459+
Byte::from_u64(count)
460+
.get_appropriate_unit(byte_unit::UnitType::Binary)
461+
.to_string()
462462
}
463463
}
464464

0 commit comments

Comments
 (0)