@@ -41,12 +41,12 @@ use crate::{
4141 set_runtime_session_override,
4242} ;
4343#[ cfg( feature = "tray" ) ]
44- use zbus:: { Connection , Proxy } ;
45- #[ cfg( feature = "tray" ) ]
4644use crate :: {
4745 paths:: { log_dir, tray_action_file} ,
4846 session:: { clear_session, options_from_config} ,
4947} ;
48+ #[ cfg( feature = "tray" ) ]
49+ use zbus:: { Connection , Proxy } ;
5050
5151/// Overlay state for daemon mode
5252#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
@@ -536,10 +536,7 @@ impl ksni::Tray for WayscriberTray {
536536 if let Some ( next_retry_at) = error. next_retry_at {
537537 let remaining = next_retry_at. saturating_duration_since ( Instant :: now ( ) ) ;
538538 if remaining > Duration :: from_secs ( 0 ) {
539- description. push_str ( & format ! (
540- " (retry in {}s)" ,
541- remaining. as_secs( ) . max( 1 )
542- ) ) ;
539+ description. push_str ( & format ! ( " (retry in {}s)" , remaining. as_secs( ) . max( 1 ) ) ) ;
543540 }
544541 }
545542 }
@@ -833,10 +830,11 @@ impl Daemon {
833830 backoff. as_secs( ) . max( 1 )
834831 ) ;
835832 #[ cfg( feature = "tray" ) ]
836- self . tray_status . set_overlay_error ( Some ( OverlaySpawnErrorInfo {
837- message,
838- next_retry_at : Some ( next_retry_at) ,
839- } ) ) ;
833+ self . tray_status
834+ . set_overlay_error ( Some ( OverlaySpawnErrorInfo {
835+ message,
836+ next_retry_at : Some ( next_retry_at) ,
837+ } ) ) ;
840838 }
841839
842840 fn clear_overlay_spawn_error ( & mut self ) {
@@ -1030,10 +1028,10 @@ impl Daemon {
10301028 // Check for toggle request
10311029 // Use Acquire ordering to ensure we see all memory operations
10321030 // that happened before the flag was set
1033- if self . toggle_requested . swap ( false , Ordering :: Acquire ) {
1034- if let Err ( err) = self . toggle_overlay ( ) {
1035- warn ! ( "Toggle overlay failed: {}" , err ) ;
1036- }
1031+ if self . toggle_requested . swap ( false , Ordering :: Acquire )
1032+ && let Err ( err) = self . toggle_overlay ( )
1033+ {
1034+ warn ! ( "Toggle overlay failed: {}" , err ) ;
10371035 }
10381036
10391037 // Small sleep to avoid busy-waiting
@@ -1373,10 +1371,7 @@ impl Daemon {
13731371 }
13741372 }
13751373
1376- warn ! (
1377- "Overlay spawn attempts failed: {}" ,
1378- failures. join( "; " )
1379- ) ;
1374+ warn ! ( "Overlay spawn attempts failed: {}" , failures. join( "; " ) ) ;
13801375 Err ( anyhow ! (
13811376 "Unable to launch overlay process (tried current_exe/argv0/PATH)"
13821377 ) )
@@ -1468,7 +1463,10 @@ async fn log_status_notifier_state() {
14681463 let conn = match Connection :: session ( ) . await {
14691464 Ok ( conn) => conn,
14701465 Err ( err) => {
1471- warn ! ( "Failed to connect to session D-Bus for tray diagnostics: {}" , err) ;
1466+ warn ! (
1467+ "Failed to connect to session D-Bus for tray diagnostics: {}" ,
1468+ err
1469+ ) ;
14721470 return ;
14731471 }
14741472 } ;
@@ -1483,10 +1481,7 @@ async fn log_status_notifier_state() {
14831481 {
14841482 Ok ( proxy) => proxy,
14851483 Err ( err) => {
1486- warn ! (
1487- "StatusNotifierWatcher unavailable (no tray host?): {}" ,
1488- err
1489- ) ;
1484+ warn ! ( "StatusNotifierWatcher unavailable (no tray host?): {}" , err) ;
14901485 return ;
14911486 }
14921487 } ;
0 commit comments