Fix clippy warnings, and an actual bug with FanControl::try_from<u32>

This commit is contained in:
Vicki Pfau 2024-04-05 15:26:09 -07:00
parent 9d7ee926f4
commit b962bbf548
6 changed files with 21 additions and 21 deletions

View file

@ -80,7 +80,7 @@ pub async fn get_gpu_performance_level() -> Result<GPUPerformanceLevel> {
.await
.inspect_err(|message| error!("Error opening sysfs file for reading: {message}"))?;
GPUPerformanceLevel::from_str(level.trim().as_ref())
GPUPerformanceLevel::from_str(level.trim())
}
pub async fn set_gpu_performance_level(level: GPUPerformanceLevel) -> Result<()> {