From a8870eef0db11b4856b60b12c975d9187e2cf341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Wed, 20 May 2020 17:58:39 +0200 Subject: [PATCH] Convert to f32 before rounding to fix arm issue --- src/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.rs b/src/util.rs index 436b6a1..09b19e0 100644 --- a/src/util.rs +++ b/src/util.rs @@ -243,7 +243,7 @@ pub fn get_display_size(size: i32) -> String { } // Round to two decimals - size = (size * 100.).round() / 100.; + let size = ((size * 100.) as f32).round() / 100.; format!("{} {}", size, UNITS[unit_counter]) }