Convert to f32 before rounding to fix arm issue

This commit is contained in:
Daniel García 2020-05-20 17:58:39 +02:00
parent 0807783388
commit a8870eef0d
No known key found for this signature in database
GPG Key ID: FC8A7D14C3CD543A
1 changed files with 1 additions and 1 deletions

View File

@ -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])
}