diff options
author | Marcin Puc <5671049+tranzystorek-io@users.noreply.github.com> | 2021-12-07 11:24:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-07 10:24:42 +0000 |
commit | 56e85f87d6c365816cca71c496aa7e49709e0b11 (patch) | |
tree | 1dbc6db878e8da9544df9445d77d1cd665b9126b /default-plugins/tab-bar/src/main.rs | |
parent | d34e6240101d246f02921cbc909dcd04f648203e (diff) |
fix(style): various internal refactorings
Diffstat (limited to 'default-plugins/tab-bar/src/main.rs')
-rw-r--r-- | default-plugins/tab-bar/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/default-plugins/tab-bar/src/main.rs b/default-plugins/tab-bar/src/main.rs index 5902050ae..31b2f2d37 100644 --- a/default-plugins/tab-bar/src/main.rs +++ b/default-plugins/tab-bar/src/main.rs @@ -43,7 +43,7 @@ impl ZellijPlugin for State { Event::ModeUpdate(mode_info) => self.mode_info = mode_info, Event::TabUpdate(tabs) => { // tabs are indexed starting from 1 so we need to add 1 - self.active_tab_idx = (&tabs).iter().position(|t| t.active).unwrap() + 1; + self.active_tab_idx = tabs.iter().position(|t| t.active).unwrap() + 1; self.tabs = tabs; } Event::Mouse(me) => match me { @@ -69,7 +69,7 @@ impl ZellijPlugin for State { } let mut all_tabs: Vec<LinePart> = vec![]; let mut active_tab_index = 0; - for t in self.tabs.iter_mut() { + for t in &mut self.tabs { let mut tabname = t.name.clone(); if t.active && self.mode_info.mode == InputMode::RenameTab { if tabname.is_empty() { |