summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-04-24 16:59:16 +0200
committerAram Drevekenin <aram@poor.dev>2024-04-24 16:59:16 +0200
commita340bbaf4f1ba3f97dea4dcd3b35926ef201d1c3 (patch)
tree9bef3469faebf6a76f4428c1e8f4f1b5f339927c
parent98e07f7dc7b03150669b9dff9eb941c9b2c14b86 (diff)
style(fmt): rustfmtfix-move-tab
-rw-r--r--zellij-server/src/screen.rs20
1 files changed, 16 insertions, 4 deletions
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index ac5410e71..cd471652f 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -1629,12 +1629,25 @@ impl Screen {
}
fn switch_tabs(&mut self, active_tab_pos: usize, other_tab_pos: usize, client_id: u16) {
- let Some(active_tab_idx) = self.tabs.values().find(|t| t.position == active_tab_pos).map(|t| t.index) else {
+ let Some(active_tab_idx) = self
+ .tabs
+ .values()
+ .find(|t| t.position == active_tab_pos)
+ .map(|t| t.index)
+ else {
log::error!("Failed to find active tab at position: {}", active_tab_pos);
return;
};
- let Some(other_tab_idx) = self.tabs.values().find(|t| t.position == other_tab_pos).map(|t| t.index) else {
- log::error!("Failed to find tab to switch to at position: {}", other_tab_pos);
+ let Some(other_tab_idx) = self
+ .tabs
+ .values()
+ .find(|t| t.position == other_tab_pos)
+ .map(|t| t.index)
+ else {
+ log::error!(
+ "Failed to find tab to switch to at position: {}",
+ other_tab_pos
+ );
return;
};
@@ -1669,7 +1682,6 @@ impl Screen {
}
pub fn move_active_tab_to_right(&mut self, client_id: ClientId) -> Result<()> {
-
let err_context = || "Failed to move active tab right ";
if self.tabs.len() < 2 {
debug!("cannot move tab to right: only one tab exists");