@@ -240,7 +240,6 @@ impl App {
240240 fn render_frame ( & mut self , f : & mut Frame , theme : & Theme ) {
241241 let area = f. area ( ) ;
242242
243- if self . sftp_session_id . is_some ( ) && matches ! ( self . mode, AppMode :: Sftp ) { }
244243 if let Some ( idx) = self . active_session {
245244 if let Some ( s) = self . sessions . get ( idx) {
246245 if matches ! ( s. status, SessionStatus :: Active | SessionStatus :: Connecting )
@@ -465,7 +464,7 @@ impl App {
465464 if pos < line_str. len ( ) {
466465 spans. push ( Span :: raw ( line_str[ pos..] . to_string ( ) ) ) ;
467466 }
468- lines[ li as usize ] = Line :: from ( spans) ;
467+ lines[ li] = Line :: from ( spans) ;
469468 }
470469 }
471470 let ( cursor_col, cursor_row) = self . sessions [ idx] . view . cursor ( ) ;
@@ -1482,22 +1481,22 @@ impl App {
14821481 return ;
14831482 }
14841483
1485- if !self . sessions . is_empty ( ) && !matches ! ( self . mode, AppMode :: Prompt { .. } ) {
1486- if k. code == KeyCode :: Tab
1487- && !k. modifiers . contains ( KeyModifiers :: CONTROL )
1488- && !self . capture_mode
1489- {
1490- self . focus = Focus :: Terminal ;
1484+ if !self . sessions . is_empty ( )
1485+ && !matches ! ( self . mode, AppMode :: Prompt { .. } )
1486+ && k. code == KeyCode :: Tab
1487+ && !k. modifiers . contains ( KeyModifiers :: CONTROL )
1488+ && !self . capture_mode
1489+ {
1490+ self . focus = Focus :: Terminal ;
14911491
1492- let first = self
1493- . sessions
1494- . iter ( )
1495- . position ( |s| s. is_active ( ) || s. disconnected ( ) . is_some ( ) )
1496- . or ( self . active_session ) ;
1497- if let Some ( i) = first {
1498- self . active_session = Some ( i) ;
1499- return ;
1500- }
1492+ let first = self
1493+ . sessions
1494+ . iter ( )
1495+ . position ( |s| s. is_active ( ) || s. disconnected ( ) . is_some ( ) )
1496+ . or ( self . active_session ) ;
1497+ if let Some ( i) = first {
1498+ self . active_session = Some ( i) ;
1499+ return ;
15011500 }
15021501 }
15031502
@@ -1883,7 +1882,7 @@ impl App {
18831882 }
18841883 ( KeyCode :: Enter , _) => {
18851884 if let Some ( h) = self . selected_host ( ) . cloned ( ) {
1886- let _ = cmd_tx. send ( Cmd :: Connect { host : h } ) ;
1885+ let _ = cmd_tx. send ( Cmd :: Connect { host : Box :: new ( h ) } ) ;
18871886 }
18881887 }
18891888 ( KeyCode :: F ( 2 ) , _) => {
@@ -3891,7 +3890,7 @@ fn format_network_speed(kbs: f32) -> String {
38913890 } else if kbs >= 1.0 {
38923891 format ! ( "{:.0}KB/s" , kbs)
38933892 } else {
3894- format ! ( "0B/s" )
3893+ "0B/s" . to_string ( )
38953894 }
38963895}
38973896
@@ -4303,7 +4302,7 @@ fn key_to_bytes(k: KeyEvent) -> Vec<u8> {
43034302
43044303#[ derive( Debug ) ]
43054304pub enum Cmd {
4306- Connect { host : Host } ,
4305+ Connect { host : Box < Host > } ,
43074306 CancelConnect ,
43084307 OpenSftp { session_id : SessionId } ,
43094308 SftpEnter ,
0 commit comments