mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-01-22 17:33:19 +01:00
fix: cargo clippy --fix
This commit is contained in:
@@ -4,7 +4,6 @@ use std::process::Command;
|
|||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
|
|
||||||
use anime_cli::{AnimeActions, AnimeCommand};
|
use anime_cli::{AnimeActions, AnimeCommand};
|
||||||
use argh;
|
|
||||||
use aura_cli::{LedPowerCommand1, LedPowerCommand2};
|
use aura_cli::{LedPowerCommand1, LedPowerCommand2};
|
||||||
use dmi_id::DMIID;
|
use dmi_id::DMIID;
|
||||||
use fan_curve_cli::FanCurveCommand;
|
use fan_curve_cli::FanCurveCommand;
|
||||||
@@ -373,7 +372,7 @@ fn handle_anime(cmd: &AnimeCommand) -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
proxy.set_builtins_enabled(enable)?;
|
proxy.set_builtins_enabled(enable)?;
|
||||||
}
|
}
|
||||||
if let Some(bright) = cmd.brightness {
|
if let Some(bright) = cmd.brightness {
|
||||||
proxy.set_brightness(bright.into())?;
|
proxy.set_brightness(bright)?;
|
||||||
}
|
}
|
||||||
if let Some(enable) = cmd.off_when_lid_closed {
|
if let Some(enable) = cmd.off_when_lid_closed {
|
||||||
proxy.set_off_when_lid_closed(enable)?;
|
proxy.set_off_when_lid_closed(enable)?;
|
||||||
@@ -861,7 +860,7 @@ fn handle_throttle_profile(
|
|||||||
}
|
}
|
||||||
crate::cli_opts::ProfileSubCommand::Get(_) => {
|
crate::cli_opts::ProfileSubCommand::Get(_) => {
|
||||||
println!("Active profile: {current:?}");
|
println!("Active profile: {current:?}");
|
||||||
println!("");
|
println!();
|
||||||
println!("AC profile {:?}", proxy.platform_profile_on_ac()?);
|
println!("AC profile {:?}", proxy.platform_profile_on_ac()?);
|
||||||
println!("Battery profile {:?}", proxy.platform_profile_on_battery()?);
|
println!("Battery profile {:?}", proxy.platform_profile_on_battery()?);
|
||||||
}
|
}
|
||||||
@@ -1028,7 +1027,7 @@ fn handle_armoury_command(cmd: &ArmouryCommand) -> Result<(), Box<dyn std::error
|
|||||||
print_firmware_attr(attr)?;
|
print_firmware_attr(attr)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Ok(());
|
Ok(())
|
||||||
}
|
}
|
||||||
ArmourySubCommand::Get(g) => {
|
ArmourySubCommand::Get(g) => {
|
||||||
if let Ok(attrs) = find_iface::<AsusArmouryProxyBlocking>("xyz.ljones.AsusArmoury") {
|
if let Ok(attrs) = find_iface::<AsusArmouryProxyBlocking>("xyz.ljones.AsusArmoury") {
|
||||||
@@ -1039,7 +1038,7 @@ fn handle_armoury_command(cmd: &ArmouryCommand) -> Result<(), Box<dyn std::error
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Ok(());
|
Ok(())
|
||||||
}
|
}
|
||||||
ArmourySubCommand::Set(s) => {
|
ArmourySubCommand::Set(s) => {
|
||||||
if let Ok(attrs) = find_iface::<AsusArmouryProxyBlocking>("xyz.ljones.AsusArmoury") {
|
if let Ok(attrs) = find_iface::<AsusArmouryProxyBlocking>("xyz.ljones.AsusArmoury") {
|
||||||
@@ -1056,7 +1055,7 @@ fn handle_armoury_command(cmd: &ArmouryCommand) -> Result<(), Box<dyn std::error
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Ok(());
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user