Skip to content

Commit

Permalink
micro change
Browse files Browse the repository at this point in the history
  • Loading branch information
INikonI committed Jun 17, 2022
1 parent 8671a0b commit 313132c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/presence/system_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,10 @@ pub fn start(mut drpc: DiscordIpcClient, mut preset: Preset) {
percent_perfomance * max_freq / 100_f64 / 1000_f64
};

let details = &format!(
let details: &str = &format!(
"CPU: {:.0}% | RAM: {}/{} GB",
cpu_usage().expect("Failed to get cpu usage").one * 100_f64,
used_memory,
&total_memory
used_memory, &total_memory
);

let state: &str = &format!(
Expand Down Expand Up @@ -211,11 +210,10 @@ pub fn start(mut drpc: DiscordIpcClient, mut preset: Preset) {
(sysinfo_system.used_memory() as f64 / 1024_f64 / 1024_f64).round();
let current_freq: f64 = sysinfo_system.global_cpu_info().frequency() as f64 / 1000_f64;

let details = &format!(
let details: &str = &format!(
"CPU: {:.0}% | RAM: {}/{} GB",
cpu_usage().expect("Failed to get cpu usage").one * 100_f64,
used_memory,
&total_memory
used_memory, &total_memory
);

let state: &str = &format!(
Expand Down

0 comments on commit 313132c

Please sign in to comment.