diff --git a/src/client/tab.rs b/src/client/tab.rs index 23146eba..f9d98ace 100644 --- a/src/client/tab.rs +++ b/src/client/tab.rs @@ -596,22 +596,18 @@ impl Tab { } pub fn write_to_terminals_on_current_tab(&mut self, input_bytes: Vec) { let pane_ids = self.get_pane_ids(); - pane_ids.iter().for_each(|pane_id| { - match pane_id { - PaneId::Terminal(pid) => { - self.write_to_pane_id(input_bytes.clone(), *pid); - } - PaneId::Plugin(_) => {} + pane_ids.iter().for_each(|pane_id| match pane_id { + PaneId::Terminal(pid) => { + self.write_to_pane_id(input_bytes.clone(), *pid); } - }); + PaneId::Plugin(_) => {} + }); } - pub fn write_to_pane_id(&mut self, mut input_bytes: Vec, pid:RawFd) { + pub fn write_to_pane_id(&mut self, mut input_bytes: Vec, pid: RawFd) { self.os_api - .write_to_tty_stdin(pid, &mut input_bytes) - .expect("failed to write to terminal"); - self.os_api - .tcdrain(pid) - .expect("failed to drain terminal"); + .write_to_tty_stdin(pid, &mut input_bytes) + .expect("failed to write to terminal"); + self.os_api.tcdrain(pid).expect("failed to drain terminal"); } pub fn write_to_active_terminal(&mut self, input_bytes: Vec) { match self.get_active_pane_id() { diff --git a/src/common/input/handler.rs b/src/common/input/handler.rs index fa5268bd..62118722 100644 --- a/src/common/input/handler.rs +++ b/src/common/input/handler.rs @@ -246,9 +246,8 @@ impl InputHandler { } Action::ToggleActiveSyncPanes => { self.send_screen_instructions - .send(ScreenInstruction::ToggleActiveSyncPanes) - .unwrap(); - + .send(ScreenInstruction::ToggleActiveSyncPanes) + .unwrap(); } Action::CloseTab => { self.command_is_executing.closing_pane(); diff --git a/src/common/mod.rs b/src/common/mod.rs index f56a1c91..d829451e 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -323,8 +323,7 @@ pub fn start(mut os_input: Box, opts: CliArgs) { let active_tab = screen.get_active_tab_mut().unwrap(); match active_tab.is_sync_panes_active() { true => active_tab.write_to_terminals_on_current_tab(bytes), - false => active_tab - .write_to_active_terminal(bytes), + false => active_tab.write_to_active_terminal(bytes), } } ScreenInstruction::ResizeLeft => { @@ -455,7 +454,6 @@ pub fn start(mut os_input: Box, opts: CliArgs) { ScreenInstruction::Quit => { break; } - } } }