diff options
| author | tv <tv@krebsco.de> | 2026-10-26 21:56:20 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-26 21:56:20 +0100 |
| commit | f937094b9c585b0b1f1f404ee1f962d97dcc2e80 (patch) | |
| tree | 3c4e5ba952c6babc5fee757995f838ba2deb909b /src/units.rs | |
| parent | 7dc2b728ca868ec7ed5f7b72eef43b0a0087ae04 (diff) | |
make clippy happy again
Diffstat (limited to 'src/units.rs')
| -rw-r--r-- | src/units.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/units.rs b/src/units.rs index cec5ffc..ac08ebf 100644 --- a/src/units.rs +++ b/src/units.rs @@ -134,7 +134,7 @@ pub(crate) fn parse_size(text: &str) -> Result<u64, String> { pub(crate) fn format_size(bytes: u64) -> String { SIZE_UNITS .iter() - .find(|(_, scale)| bytes != 0 && bytes % scale == 0) + .find(|(_, scale)| bytes != 0 && bytes.is_multiple_of(*scale)) .map(|(name, scale)| format!("{}{name}", bytes / scale)) .unwrap_or_else(|| "0B".to_owned()) } |
