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 | 08f5df1f0a2e22876a5b49a4f9e2e05a61df882a (patch) | |
| tree | 113050df0bef5e8f3e9d188c69fc2a0c76d2eb17 /src/units.rs | |
| parent | ecdb3ee944f5c171faac3a71117e2ff27e064295 (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()) } |
