diff --git a/src/power.rs b/src/power.rs index 6bb6019..ac6f1da 100644 --- a/src/power.rs +++ b/src/power.rs @@ -143,10 +143,7 @@ pub async fn get_gpu_clocks() -> Result { _ => break, }; - match mhz.parse() { - Ok(mhz) => return Ok(mhz), - Err(e) => return Err(e.into()), - } + return Ok(mhz.parse()?); } Err(anyhow!("Couldn't find GPU clocks")) }