1 2 3 4 5 6 7 8 9 10 11
pub(crate) fn format_freed(bytes: u64) -> String { const KIB: u64 = 1024; const MIB: u64 = KIB * KIB; if bytes >= MIB { format!("{} MiB", bytes / MIB) } else if bytes >= KIB { format!("{} KiB", bytes / KIB) } else { format!("{bytes} B") } }