From 03a797d2e33c189f6113d135cfdd1bababa2fc06 Mon Sep 17 00:00:00 2001 From: jakeroggenbuck Date: Mon, 10 Jan 2022 15:00:42 -0800 Subject: [PATCH] Remove space from value and move it to output --- src/display.rs | 2 +- src/system.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display.rs b/src/display.rs index 220215e8..055d3af3 100644 --- a/src/display.rs +++ b/src/display.rs @@ -57,7 +57,7 @@ pub fn print_cpus(cpus: Vec, name: String, raw: bool) { println!("{} {}", x.name, x.cur_freq); } } else { - println!("Name:{}", name); + println!("Name: {}", name); for x in cpus { println!("{} is currently @ {} MHz", x.name, x.cur_freq / 1000); } diff --git a/src/system.rs b/src/system.rs index 62f62ef4..67ff0cab 100644 --- a/src/system.rs +++ b/src/system.rs @@ -29,7 +29,7 @@ pub fn check_cpu_name() -> Result { // For each line that starts with the clock speed identifier return the number after : as a 32 // bit integer find_cpu_mhz - .and_then(|line| line.split(':').last()) + .and_then(|line| line.split(": ").last()) .map(|x| x.to_owned()) .ok_or(Error::Unknown) }