From 973e51f9696a7ee3a28d9f826406e62dbfb51623 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Sun, 27 Sep 2026 13:13:48 -0700 Subject: [PATCH] Marketplace: use is_multiple_of in describe_size (clippy) Co-Authored-By: Claude Opus 5.5 --- app/src-tauri/src/marketplace/tree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src-tauri/src/marketplace/tree.rs b/app/src-tauri/src/marketplace/tree.rs index 4a11489..d41ce3b 100644 --- a/app/src-tauri/src/marketplace/tree.rs +++ b/app/src-tauri/src/marketplace/tree.rs @@ -53,9 +53,9 @@ pub enum ReadError { pub(crate) fn describe_size(bytes: u64) -> String { const KIB: u64 = 1024; const MIB: u64 = 1024 * 1024; - if bytes >= MIB && bytes % MIB == 0 { + if bytes >= MIB && bytes.is_multiple_of(MIB) { format!("{} MiB", bytes / MIB) - } else if bytes >= KIB && bytes % KIB == 0 { + } else if bytes >= KIB && bytes.is_multiple_of(KIB) { format!("{} KiB", bytes / KIB) } else { format!("{} bytes", bytes)