From 0fe21234536aeca550e340b7af7a44161436c86c Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 17 Oct 2024 23:43:56 -0700 Subject: [PATCH] Change format collect to string function --- src/daemon.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/daemon.rs b/src/daemon.rs index 48cea28..302251d 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -380,8 +380,12 @@ impl Checker for Daemon { fn preprint_render(&mut self) -> String { let message = format!("{}\n", self.message); let title = "Name\tMax\tMin\tFreq\tTemp\tUsage\tGovernor\n"; + // Render each line of cpu core - let cpus = &self.cpus.iter().map(|c| format!("{c}")).collect::(); + let mut cpus = String::new(); + for c in &self.cpus { + cpus.push_str(&c.to_string()); + } // Prints battery percent or N/A if not let battery_status = print_battery_status(&self.battery);