aboutsummaryrefslogtreecommitdiff
path: root/src/utils/netspeed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/netspeed.rs')
-rw-r--r--src/utils/netspeed.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/netspeed.rs b/src/utils/netspeed.rs
index 4829f30..4181daa 100644
--- a/src/utils/netspeed.rs
+++ b/src/utils/netspeed.rs
@@ -18,7 +18,7 @@ pub async fn get_netspeed() -> ThreadsData {
let rx = calculate(rx_bps);
let data = format!(
- "{}{} {}{} {}",
+ " {}{} {}{} {}",
rx, CONFIG.netspeed.recieve_icon, tx, CONFIG.netspeed.transmit_icon, CONFIG.seperator
);
ThreadsData::NetSpeed(data)
@@ -36,7 +36,7 @@ fn parse_speed_file(pth: &str) -> u64 {
}
fn calculate(speed: u64) -> String {
- let lookup = ["B", "kB", "MB"];
+ let lookup = ["b", "kb", "Mb"];
let mut speed = speed as f64;
let mut idx = 0;
while speed >= 1024.0 && idx < lookup.len() {