@@ -220,8 +220,7 @@ async fn connect_and_listen(
220220 wake_rx : & mut tokio:: sync:: mpsc:: Receiver < ( ) > ,
221221) -> anyhow:: Result < bool > {
222222 // Prevent system idle sleep during device setup (connect, discover, divert).
223- let _power_guard =
224- crate :: platform:: PowerAssertion :: prevent_idle_sleep ( "HID++ device setup" ) ;
223+ let _power_guard = crate :: platform:: PowerAssertion :: prevent_idle_sleep ( "HID++ device setup" ) ;
225224
226225 let device = connect_device ( index_override) . await ?;
227226 let name = device. name ( ) . to_string ( ) ;
@@ -351,9 +350,7 @@ async fn connect_and_listen(
351350}
352351
353352/// Headless connect_and_listen — no diversion, no actions, just log.
354- async fn connect_and_listen_headless (
355- index_override : Option < DeviceIndex > ,
356- ) -> anyhow:: Result < ( ) > {
353+ async fn connect_and_listen_headless ( index_override : Option < DeviceIndex > ) -> anyhow:: Result < ( ) > {
357354 let device = connect_device ( index_override) . await ?;
358355
359356 let mut rx = device. subscribe ( ) ;
@@ -448,9 +445,7 @@ fn handle_notification(
448445 gesture:: GestureDirection :: Up => gesture_cfg. up . as_ref ( ) ,
449446 gesture:: GestureDirection :: Down => gesture_cfg. down . as_ref ( ) ,
450447 gesture:: GestureDirection :: Left => gesture_cfg. left . as_ref ( ) ,
451- gesture:: GestureDirection :: Right => {
452- gesture_cfg. right . as_ref ( )
453- }
448+ gesture:: GestureDirection :: Right => gesture_cfg. right . as_ref ( ) ,
454449 } ;
455450 ( format ! ( "swipe {dir_name}" ) , a)
456451 }
@@ -479,11 +474,7 @@ fn handle_notification(
479474 gestures. button_pressed ( cid) ;
480475 } else if let Some ( action) = cfg. buttons . get ( & cid) {
481476 let desc = action_description ( action) ;
482- execute_and_notify (
483- action,
484- & format ! ( "button CID {cid}: {desc}" ) ,
485- proxy,
486- ) ;
477+ execute_and_notify ( action, & format ! ( "button CID {cid}: {desc}" ) , proxy) ;
487478 }
488479 }
489480 }
0 commit comments