mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
End up duplicating the CLI structs but without help member
This commit is contained in:
@@ -149,10 +149,7 @@ impl LaptopBase {
|
||||
0
|
||||
};
|
||||
if let Some(data) = config.get_led_mode_data(self.supported_modes[idx_next]) {
|
||||
aura_command
|
||||
.send(data.to_owned())
|
||||
.await
|
||||
.unwrap_or_else(|_| {});
|
||||
aura_command.send(data.clone()).await.unwrap_or_else(|_| {});
|
||||
}
|
||||
} else {
|
||||
warn!("Tried to step to next LED mode while in non-supported mode");
|
||||
@@ -166,10 +163,7 @@ impl LaptopBase {
|
||||
self.supported_modes.len() - 1
|
||||
};
|
||||
if let Some(data) = config.get_led_mode_data(self.supported_modes[idx_next]) {
|
||||
aura_command
|
||||
.send(data.to_owned())
|
||||
.await
|
||||
.unwrap_or_else(|_| {});
|
||||
aura_command.send(data.clone()).await.unwrap_or_else(|_| {});
|
||||
}
|
||||
} else {
|
||||
warn!("Tried to step to next LED mode while in non-supported mode");
|
||||
|
||||
@@ -161,7 +161,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
warn!("{:?} not supported", mode);
|
||||
warn!("Attempted to set unsupported mode");
|
||||
Err(AuraError::NotSupported)
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ use std::io::Write;
|
||||
|
||||
static VERSION: &str = "0.13.1";
|
||||
|
||||
#[derive(Debug, Options)]
|
||||
#[derive(Options)]
|
||||
struct CLIStart {
|
||||
#[options(help = "print help message")]
|
||||
help: bool,
|
||||
@@ -28,13 +28,13 @@ struct CLIStart {
|
||||
command: Option<Command>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Options)]
|
||||
#[derive(Options)]
|
||||
enum Command {
|
||||
#[options(help = "Set the keyboard lighting from built-in modes")]
|
||||
LedMode(LedModeCommand),
|
||||
}
|
||||
|
||||
#[derive(Debug, Options)]
|
||||
#[derive(Options)]
|
||||
struct LedModeCommand {
|
||||
#[options(help = "print help message")]
|
||||
help: bool,
|
||||
|
||||
Reference in New Issue
Block a user