From e33174c0bd425e909bc4fd0c19c566bf0587b4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Sat, 29 Jan 2022 23:23:26 +0100 Subject: [PATCH] netspeed layout improved --- src/utils/netspeed.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/netspeed.rs b/src/utils/netspeed.rs index fae36b5..4829f30 100644 --- a/src/utils/netspeed.rs +++ b/src/utils/netspeed.rs @@ -18,8 +18,8 @@ pub async fn get_netspeed() -> ThreadsData { let rx = calculate(rx_bps); let data = format!( - " {} {} {} {} {}", - CONFIG.netspeed.recieve_icon, rx, CONFIG.netspeed.transmit_icon, tx, CONFIG.seperator + "{}{} {}{} {}", + rx, CONFIG.netspeed.recieve_icon, tx, CONFIG.netspeed.transmit_icon, CONFIG.seperator ); ThreadsData::NetSpeed(data) } @@ -43,5 +43,5 @@ fn calculate(speed: u64) -> String { speed /= 1024.0; idx += 1; } - format!("{:.1} {}", speed, lookup[idx]) + format!("{: >5.1}{: >2}", speed, lookup[idx]) }