chore: apply recommendations from clippy

This commit is contained in:
Cheong Lau 2025-10-04 10:51:18 +10:00 • committed by GitHub
parent cec55dafd7
commit 8e0f1c4a09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 720 additions and 824 deletions

View file

@ -66,7 +66,7 @@ pub async fn get_power_profile(daemon: Backend<'_>) -> Result<Power> {
"Battery" => Ok(Power::Battery),
"Balanced" => Ok(Power::Balanced),
"Performance" => Ok(Power::Performance),
_ => panic!("Unknown power profile: {}", power),
_ => panic!("Unknown power profile: {power}"),
}
}
Backend::PowerProfilesDaemon(ppd) => {
@ -226,7 +226,7 @@ pub async fn get_charging_limit() -> anyhow::Result<bool> {
Backend::PowerProfilesDaemon(_) => {
tracing::info!("Power Profiles Daemon is not supported.");
}
};
}
}
}
anyhow::bail!("Unsupported")
@ -245,7 +245,7 @@ pub async fn set_charging_limit() -> Result<()> {
"Setting charging limit via Power Profiles Daemon is not supported."
);
}
};
}
}
}
Ok(())