From a1e8bb505c0c61bf3cf43a0923752a00aa921c9a Mon Sep 17 00:00:00 2001 From: fdai7381 Date: Tue, 24 Jan 2023 13:10:04 +0100 Subject: [PATCH] fix: update mega to mebi bytes --- src/builtins/fetch.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/builtins/fetch.rs b/src/builtins/fetch.rs index 7ba16aa..434b31f 100644 --- a/src/builtins/fetch.rs +++ b/src/builtins/fetch.rs @@ -35,10 +35,10 @@ impl Builtin for Fetch { println!("{} {}", "UPTIME".red().bold(), format_uptime(sys.uptime())); println!("{} {}", "CPU".magenta().bold(), sys.cpus()[0].brand()); println!( - "{} {}MB / {}MB", + "{} {}MiB / {}MiB", "MEMORY".cyan().bold(), - bytes_to_mega_bytes(sys.used_memory()), - bytes_to_mega_bytes(sys.total_memory()) + bytes_to_mebi_bytes(sys.used_memory()), + bytes_to_mebi_bytes(sys.total_memory()) ); Ok(()) @@ -53,7 +53,7 @@ fn format_uptime(uptime: u64) -> String { format!("{:.0}h {:.0}m {:.0}s", h, m, s) } -fn bytes_to_mega_bytes(bytes: u64) -> u64 { +fn bytes_to_mebi_bytes(bytes: u64) -> u64 { bytes / 1024 / 1024 }