diff --git a/src/commands/gpu.rs b/src/commands/gpu.rs index 17190c6..2230ddf 100644 --- a/src/commands/gpu.rs +++ b/src/commands/gpu.rs @@ -864,18 +864,9 @@ fn run_on_dgpu(command: &[String]) { } let env_vars = vec![ - ( - "__NV_PRIME_RENDER_OFFLOAD", - "1".to_string(), - ), - ( - "__GLX_VENDOR_LIBRARY_NAME", - "nvidia".to_string(), - ), - ( - "__VK_LAYER_NV_optimus", - "NVIDIA_only".to_string(), - ), + ("__NV_PRIME_RENDER_OFFLOAD", "1".to_string()), + ("__GLX_VENDOR_LIBRARY_NAME", "nvidia".to_string()), + ("__VK_LAYER_NV_optimus", "NVIDIA_only".to_string()), ]; let mut cmd = Command::new(&command[0]); diff --git a/src/commands/status.rs b/src/commands/status.rs index ffc3521..01d8b88 100644 --- a/src/commands/status.rs +++ b/src/commands/status.rs @@ -208,11 +208,7 @@ pub fn execute() { if let Some(line) = stdout.lines().next() { let parts: Vec<&str> = line.split(", ").collect(); if parts.len() >= 2 { - println!( - "GPU: {} @ {}°C (NVIDIA)", - parts[0].trim(), - parts[1].trim() - ); + println!("GPU: {} @ {}°C (NVIDIA)", parts[0].trim(), parts[1].trim()); } } } diff --git a/src/commands/temperature.rs b/src/commands/temperature.rs index 808ae49..71b730e 100644 --- a/src/commands/temperature.rs +++ b/src/commands/temperature.rs @@ -43,10 +43,7 @@ pub fn execute() { other => other, }; - println!( - " {} ({}): {:.1}°C", - display_name, label_str, celsius - ); + println!(" {} ({}): {:.1}°C", display_name, label_str, celsius); found = true; } @@ -71,11 +68,7 @@ pub fn execute() { && let Ok(temp_c) = temp.trim().parse::() { let info = if parts.len() >= 3 { - format!( - " [{} @ {}]", - parts[1].trim(), - parts[2].trim() - ) + format!(" [{} @ {}]", parts[1].trim(), parts[2].trim()) } else { String::new() }; @@ -102,18 +95,16 @@ pub fn execute() { let type_path = entry.path().join("type"); let temp_path = entry.path().join("temp"); - if let (Ok(type_content), Ok(temp_content)) = - (fs::read_to_string(&type_path), fs::read_to_string(&temp_path)) - { + if let (Ok(type_content), Ok(temp_content)) = ( + fs::read_to_string(&type_path), + fs::read_to_string(&temp_path), + ) { let zone_type = type_content.trim(); let millideg: i64 = temp_content.trim().parse().unwrap_or(0); let celsius = millideg as f64 / 1000.0; // Skip if we already showed this from hwmon - if zone_type == "x86_pkg_temp" - || zone_type == "k10temp" - || zone_type == "acpitz" - { + if zone_type == "x86_pkg_temp" || zone_type == "k10temp" || zone_type == "acpitz" { continue; }