mirror of
https://github.com/jht5945/rust_util.git
synced 2025-12-27 15:40:03 +08:00
add TB
This commit is contained in:
@@ -70,7 +70,10 @@ pub fn get_display_size(size: i64) -> String {
|
||||
if size < SIZE_PB {
|
||||
return format!("{:.*}GB", 2, (size as f64) / 1024. / 1024. / 1024.);
|
||||
}
|
||||
return format!("{:.*}PB", 2, (size as f64) / 1024. / 1024. / 1024. / 1024.);
|
||||
if size < SIZE_TB {
|
||||
return format!("{:.*}PB", 2, (size as f64) / 1024. / 1024. / 1024. / 1024.);
|
||||
}
|
||||
return format!("{:.*}TB", 2, (size as f64) / 1024. / 1024. / 1024. / 1024. / 1024.);
|
||||
}
|
||||
|
||||
pub fn run_command_and_wait(cmd: &mut Command) -> io::Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user