mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
fix(ci): Resolve clippy warnings for CI pipeline
- Add Default impl for AnimatorState (new_without_default) - Fix needless late initialization in tray.rs - Collapse else-if in setup_aura.rs - Fix mut_range_bound in anime-led-scan example Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -167,16 +167,15 @@ pub fn init_tray(
|
||||
};
|
||||
|
||||
// TODO: return an error to the UI
|
||||
let tray;
|
||||
match tray_init.disable_dbus_name(true).spawn().await {
|
||||
Ok(t) => tray = t,
|
||||
let tray = match tray_init.disable_dbus_name(true).spawn().await {
|
||||
Ok(t) => t,
|
||||
Err(e) => {
|
||||
log::error!(
|
||||
"Tray unable to be initialised: {e:?}. Do you have a system tray enabled?"
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
info!("Tray started");
|
||||
ICONS.get_or_init(|| Icons {
|
||||
|
||||
@@ -216,10 +216,8 @@ pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
||||
if let Err(e) = aura_inner.stop_animation().await {
|
||||
error!("Failed to stop animation: {e}");
|
||||
}
|
||||
} else {
|
||||
if let Err(e) = aura_inner.start_animation(json).await {
|
||||
error!("Failed to start animation: {e}");
|
||||
}
|
||||
} else if let Err(e) = aura_inner.start_animation(json).await {
|
||||
error!("Failed to start animation: {e}");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user