cargo fmt and README.md restyle

This commit is contained in:
Denis Benato
2025-11-05 20:02:01 +01:00
parent 0eae9e55c6
commit 698999e828
4 changed files with 260 additions and 166 deletions

View File

@@ -78,7 +78,11 @@ pub struct ProfileCommand {
#[options(short = "a", meta = "", help = "set the profile to use on AC power")]
pub profile_set_ac: Option<PlatformProfile>,
#[options(short = "b", meta = "", help = "set the profile to use on battery power")]
#[options(
short = "b",
meta = "",
help = "set the profile to use on battery power"
)]
pub profile_set_bat: Option<PlatformProfile>,
}

View File

@@ -979,7 +979,13 @@ fn handle_throttle_profile(
return Err(ProfileError::NotSupported.into());
}
if !cmd.next && !cmd.list && cmd.profile_set.is_none() && !cmd.profile_get && cmd.profile_set_ac.is_none() && cmd.profile_set_bat.is_none() {
if !cmd.next
&& !cmd.list
&& cmd.profile_set.is_none()
&& !cmd.profile_get
&& cmd.profile_set_ac.is_none()
&& cmd.profile_set_bat.is_none()
{
if !cmd.help {
println!("Missing arg or command\n");
}
@@ -1014,7 +1020,10 @@ fn handle_throttle_profile(
if cmd.profile_get {
println!("Active profile is {current:?}");
println!("Profile on AC is {:?}", proxy.platform_profile_on_ac()?);
println!("Profile on Battery is {:?}", proxy.platform_profile_on_battery()?);
println!(
"Profile on Battery is {:?}",
proxy.platform_profile_on_battery()?
);
}
Ok(())