From 05d4e8215351e0f05f366d7f25aceb3dfe49dfdc Mon Sep 17 00:00:00 2001 From: ClementTsang Date: Sun, 15 Sep 2019 01:32:08 -0400 Subject: [skip travis] Changed rustfmt, formatting. --- src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index d771c6ec..8c56d9da 100644 --- a/src/main.rs +++ b/src/main.rs @@ -302,8 +302,11 @@ fn update_cpu_data_points(show_avg_cpu : bool, app_data : &data_collection::Data for (i, data) in cpu_collection.iter().enumerate() { cpu_data_vector.push(( // + 1 to skip total CPU if show_avg_cpu is false - format!("{:4}: ", &*(app_data.list_of_cpu_packages.last().unwrap().cpu_vec[i + if show_avg_cpu { 0 } else { 1 }].cpu_name)).to_uppercase() - + &format!("{:3}%", (data.last().unwrap_or(&(0_f64, 0_f64)).1.round() as u64)), + format!( + "{:4}: ", + &*(app_data.list_of_cpu_packages.last().unwrap().cpu_vec[i + if show_avg_cpu { 0 } else { 1 }].cpu_name) + ) + .to_uppercase() + &format!("{:3}%", (data.last().unwrap_or(&(0_f64, 0_f64)).1.round() as u64)), data.clone(), )) } -- cgit v1.2.3