Reformat with trailing comma

This commit is contained in:
Luke Jones
2025-02-14 16:06:20 +13:00
parent 0bdf0474c9
commit 2c006699f2
113 changed files with 791 additions and 792 deletions
+4 -4
View File
@@ -68,7 +68,7 @@ pub fn show_toast(
success: SharedString,
fail: SharedString,
handle: Weak<MainWindow>,
result: zbus::Result<()>
result: zbus::Result<()>,
) {
match result {
Ok(_) => {
@@ -78,7 +78,7 @@ pub fn show_toast(
log::warn!("{fail}: {e}");
handle.unwrap().invoke_show_toast(fail)
})
.ok()
.ok(),
};
}
@@ -98,9 +98,9 @@ pub fn setup_window(config: Arc<Mutex<Config>>) -> MainWindow {
available.contains(&"xyz.ljones.Anime".to_string()),
available.contains(&"xyz.ljones.FanCurves".to_string()),
true,
true
true,
]
.into()
.into(),
);
ui.on_exit_app(move || {
+2 -2
View File
@@ -51,9 +51,9 @@ pub fn setup_anime_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
boot: boot.into(),
awake: awake.into(),
sleep: sleep.into(),
shutdown: shutdown.into()
shutdown: shutdown.into(),
})
.await
.await,
);
});
});
+4 -4
View File
@@ -9,7 +9,7 @@ use slint::{ComponentHandle, Model, RgbaColor, SharedString};
use crate::config::Config;
use crate::ui::show_toast;
use crate::{
set_ui_callbacks, set_ui_props_async, AuraPageData, MainWindow, PowerZones as SlintPowerZones
set_ui_callbacks, set_ui_props_async, AuraPageData, MainWindow, PowerZones as SlintPowerZones,
};
fn decode_hex(s: &str) -> RgbaColor<u8> {
@@ -19,7 +19,7 @@ fn decode_hex(s: &str) -> RgbaColor<u8> {
alpha: 255,
red: 0,
green: 0,
blue: 0
blue: 0,
};
}
let c: Vec<u8> = (0..s.len())
@@ -30,7 +30,7 @@ fn decode_hex(s: &str) -> RgbaColor<u8> {
alpha: 255,
red: *c.first().unwrap_or(&255),
green: *c.get(1).unwrap_or(&128),
blue: *c.get(2).unwrap_or(&32)
blue: *c.get(2).unwrap_or(&32),
}
}
@@ -198,7 +198,7 @@ pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
"Aura power settings changed".into(),
"Failed to set Aura power settings".into(),
handle_copy,
proxy_copy.set_led_power(power).await
proxy_copy.set_led_power(power).await,
);
});
});
+3 -3
View File
@@ -13,7 +13,7 @@ pub fn update_fan_data(
handle: Weak<MainWindow>,
bal: Vec<CurveData>,
perf: Vec<CurveData>,
quiet: Vec<CurveData>
quiet: Vec<CurveData>,
) {
handle
.upgrade_in_event_loop(move |handle| {
@@ -24,7 +24,7 @@ pub fn update_fan_data(
.zip(pwm.iter())
.map(|(x, y)| Node {
x: *x as f32,
y: *y as f32
y: *y as f32,
})
.collect();
tmp.as_slice().into()
@@ -199,6 +199,6 @@ fn fan_data_for(fan: FanType, enabled: bool, data: Vec<Node>) -> CurveData {
fan: fan.into(),
pwm,
temp,
enabled
enabled,
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ use crate::{set_ui_callbacks, set_ui_props_async, AttrMinMax, MainWindow, System
const MINMAX: AttrMinMax = AttrMinMax {
min: 0,
max: 0,
current: -1.0
current: -1.0,
};
pub fn setup_system_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {