fix(about): correct display of memory and disk capacity

This commit is contained in:
Avery 2024-03-12 19:25:50 -04:00 committed by GitHub
parent 37e5bcc402
commit d6b28231e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -209,7 +209,8 @@ pub fn read_to_string<'a, P: AsRef<OsStr>>(
} }
fn format_size(size: u64) -> String { fn format_size(size: u64) -> String {
byte_unit::Byte::from_u64(size) format!(
.get_appropriate_unit(byte_unit::UnitType::Decimal) "{:.2}",
.to_string() byte_unit::Byte::from_u64(size).get_appropriate_unit(byte_unit::UnitType::Binary)
)
} }