Skip to content

Commit

Permalink
Change format collect to string function
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeRoggenbuck committed Oct 18, 2024
1 parent ca1cbd2 commit 0fe2123
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<String>();
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);
Expand Down

0 comments on commit 0fe2123

Please sign in to comment.