fix(about): correct display of memory and disk capacity
This commit is contained in:
parent
37e5bcc402
commit
d6b28231e2
1 changed files with 4 additions and 3 deletions
|
|
@ -209,7 +209,8 @@ pub fn read_to_string<'a, P: AsRef<OsStr>>(
|
|||
}
|
||||
|
||||
fn format_size(size: u64) -> String {
|
||||
byte_unit::Byte::from_u64(size)
|
||||
.get_appropriate_unit(byte_unit::UnitType::Decimal)
|
||||
.to_string()
|
||||
format!(
|
||||
"{:.2}",
|
||||
byte_unit::Byte::from_u64(size).get_appropriate_unit(byte_unit::UnitType::Binary)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue