@@ -22,7 +22,7 @@ pub async fn handle_key_events(
2222 KeyCode :: Char ( 'q' ) => {
2323 app. quit ( ) ;
2424 }
25- KeyCode :: Char ( 'c' ) | KeyCode :: Char ( 'C' ) => {
25+ KeyCode :: Char ( 'c' | 'C' ) => {
2626 if key_event. modifiers == KeyModifiers :: CONTROL {
2727 app. quit ( ) ;
2828 }
@@ -113,7 +113,7 @@ pub async fn handle_key_events(
113113 KeyCode :: Char ( 'q' ) => {
114114 app. quit ( ) ;
115115 }
116- KeyCode :: Char ( 'c' ) | KeyCode :: Char ( 'C' ) => {
116+ KeyCode :: Char ( 'c' | 'C' ) => {
117117 if key_event. modifiers == KeyModifiers :: CONTROL {
118118 app. quit ( ) ;
119119 }
@@ -150,7 +150,7 @@ pub async fn handle_key_events(
150150 . as_mut ( )
151151 . unwrap ( )
152152 . scan ( sender)
153- . await ?
153+ . await ?;
154154 }
155155 Mode :: Ap => {
156156 app. adapter
@@ -159,10 +159,10 @@ pub async fn handle_key_events(
159159 . as_mut ( )
160160 . unwrap ( )
161161 . scan ( sender)
162- . await ?
162+ . await ?;
163163 }
164164 _ => { }
165- } ;
165+ }
166166 }
167167
168168 KeyCode :: Tab => match app. adapter . device . mode {
@@ -201,12 +201,12 @@ pub async fn handle_key_events(
201201 if let Some ( ap) = & mut app. adapter . device . access_point {
202202 match ap. focused_section {
203203 APFocusedSection :: SSID => {
204- ap. focused_section = APFocusedSection :: PSK
204+ ap. focused_section = APFocusedSection :: PSK ;
205205 }
206206 APFocusedSection :: PSK => {
207- ap. focused_section = APFocusedSection :: SSID
207+ ap. focused_section = APFocusedSection :: SSID ;
208208 }
209- } ;
209+ }
210210 }
211211 }
212212 _ => { }
@@ -250,12 +250,12 @@ pub async fn handle_key_events(
250250 if let Some ( ap) = & mut app. adapter . device . access_point {
251251 match ap. focused_section {
252252 APFocusedSection :: SSID => {
253- ap. focused_section = APFocusedSection :: PSK
253+ ap. focused_section = APFocusedSection :: PSK ;
254254 }
255255 APFocusedSection :: PSK => {
256- ap. focused_section = APFocusedSection :: SSID
256+ ap. focused_section = APFocusedSection :: SSID ;
257257 }
258- } ;
258+ }
259259 }
260260 }
261261 _ => { }
@@ -278,14 +278,14 @@ pub async fn handle_key_events(
278278 Notification :: send (
279279 "Device Powered Off" . to_string ( ) ,
280280 crate :: notification:: NotificationLevel :: Info ,
281- sender. clone ( ) ,
281+ & sender. clone ( ) ,
282282 ) ?;
283283 }
284284 Err ( e) => {
285285 Notification :: send (
286286 e. to_string ( ) ,
287287 crate :: notification:: NotificationLevel :: Error ,
288- sender. clone ( ) ,
288+ & sender. clone ( ) ,
289289 ) ?;
290290 }
291291 }
@@ -296,14 +296,14 @@ pub async fn handle_key_events(
296296 Notification :: send (
297297 "Device Powered On" . to_string ( ) ,
298298 crate :: notification:: NotificationLevel :: Info ,
299- sender. clone ( ) ,
299+ & sender. clone ( ) ,
300300 ) ?;
301301 }
302302 Err ( e) => {
303303 Notification :: send (
304304 e. to_string ( ) ,
305305 crate :: notification:: NotificationLevel :: Error ,
306- sender. clone ( ) ,
306+ & sender. clone ( ) ,
307307 ) ?;
308308 }
309309 }
0 commit comments