mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Reformat with trailing comma
This commit is contained in:
@@ -17,7 +17,7 @@ pub struct SlashConfig {
|
||||
pub show_on_shutdown: bool,
|
||||
pub show_on_sleep: bool,
|
||||
pub show_on_battery: bool,
|
||||
pub show_battery_warning: bool
|
||||
pub show_battery_warning: bool,
|
||||
}
|
||||
|
||||
impl Default for SlashConfig {
|
||||
@@ -32,7 +32,7 @@ impl Default for SlashConfig {
|
||||
show_on_shutdown: true,
|
||||
show_on_sleep: true,
|
||||
show_on_battery: true,
|
||||
show_battery_warning: true
|
||||
show_battery_warning: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ impl From<&SlashConfig> for DeviceState {
|
||||
slash_enabled: config.enabled,
|
||||
slash_brightness: config.brightness,
|
||||
slash_interval: config.display_interval,
|
||||
slash_mode: config.display_mode
|
||||
slash_mode: config.display_mode,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@ pub mod trait_impls;
|
||||
pub struct Slash {
|
||||
hid: Option<Arc<Mutex<HidRaw>>>,
|
||||
usb: Option<Arc<Mutex<USBRaw>>>,
|
||||
config: Arc<Mutex<SlashConfig>>
|
||||
config: Arc<Mutex<SlashConfig>>,
|
||||
}
|
||||
|
||||
impl Slash {
|
||||
pub fn new(
|
||||
hid: Option<Arc<Mutex<HidRaw>>>,
|
||||
usb: Option<Arc<Mutex<USBRaw>>>,
|
||||
config: Arc<Mutex<SlashConfig>>
|
||||
config: Arc<Mutex<SlashConfig>>,
|
||||
) -> Self {
|
||||
Self { hid, usb, config }
|
||||
}
|
||||
@@ -57,7 +57,7 @@ impl Slash {
|
||||
config.slash_type,
|
||||
config.enabled,
|
||||
config.brightness,
|
||||
config.display_interval
|
||||
config.display_interval,
|
||||
);
|
||||
self.write_bytes(&option_packets).await?;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ use config_traits::StdConfig;
|
||||
use log::{debug, error, warn};
|
||||
use rog_slash::usb::{
|
||||
get_battery_saver_packet, get_boot_packet, get_low_battery_packet, get_options_packet,
|
||||
get_shutdown_packet, get_sleep_packet, pkt_save, pkt_set_mode
|
||||
get_shutdown_packet, get_sleep_packet, pkt_save, pkt_set_mode,
|
||||
};
|
||||
use rog_slash::{DeviceState, SlashMode};
|
||||
use zbus::zvariant::OwnedObjectPath;
|
||||
@@ -23,7 +23,7 @@ impl SlashZbus {
|
||||
pub async fn start_tasks(
|
||||
mut self,
|
||||
connection: &Connection,
|
||||
path: OwnedObjectPath
|
||||
path: OwnedObjectPath,
|
||||
) -> Result<(), RogError> {
|
||||
// let task = zbus.clone();
|
||||
self.reload()
|
||||
@@ -62,7 +62,7 @@ impl SlashZbus {
|
||||
config.slash_type,
|
||||
enabled,
|
||||
brightness,
|
||||
config.display_interval
|
||||
config.display_interval,
|
||||
))
|
||||
.await
|
||||
.map_err(|err| {
|
||||
@@ -92,7 +92,7 @@ impl SlashZbus {
|
||||
config.slash_type,
|
||||
enabled,
|
||||
brightness,
|
||||
config.display_interval
|
||||
config.display_interval,
|
||||
))
|
||||
.await
|
||||
.map_err(|err| {
|
||||
@@ -117,7 +117,7 @@ impl SlashZbus {
|
||||
let mut config = self.0.lock_config().await;
|
||||
self.0
|
||||
.write_bytes(&get_options_packet(
|
||||
config.slash_type, config.enabled, config.brightness, interval
|
||||
config.slash_type, config.enabled, config.brightness, interval,
|
||||
))
|
||||
.await
|
||||
.map_err(|err| {
|
||||
@@ -252,7 +252,7 @@ impl Reloadable for SlashZbus {
|
||||
config.slash_type,
|
||||
config.enabled,
|
||||
config.brightness,
|
||||
config.display_interval
|
||||
config.display_interval,
|
||||
))
|
||||
.await
|
||||
.map_err(|err| {
|
||||
|
||||
Reference in New Issue
Block a user