Skip to content

Commit

Permalink
cargo: require byte-unit 5.1.6 or greater
Browse files Browse the repository at this point in the history
  • Loading branch information
prestist committed Feb 17, 2025
1 parent f44ef36 commit 68198d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit 68198d0

Please sign in to comment.