aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Jankowski <daniel.jankowski@rub.de>2026-04-11 07:25:19 +0200
committerDaniel Jankowski <daniel.jankowski@rub.de>2026-04-11 07:25:19 +0200
commit4ef69ff55930373d60f6c85afc39b2494850feeb (patch)
tree94ac2a86966242c52ba22d9d8846983ef5647b58 /src
parentchore(deps): update cargo lock file (diff)
downloadsl0pstatus-4ef69ff55930373d60f6c85afc39b2494850feeb.tar.gz
sl0pstatus-4ef69ff55930373d60f6c85afc39b2494850feeb.tar.xz
sl0pstatus-4ef69ff55930373d60f6c85afc39b2494850feeb.zip
chore: linting issue in tabs widget
Diffstat (limited to 'src')
-rw-r--r--src/widgets/tabs.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/widgets/tabs.rs b/src/widgets/tabs.rs
index ef8f70b..c012e3a 100644
--- a/src/widgets/tabs.rs
+++ b/src/widgets/tabs.rs
@@ -293,29 +293,35 @@ impl TabsWidget {
fn replace_indicators(&self, content: String, tab: &TabInfo, panes: &PaneManifest) -> String {
let mut content = content;
- if content.contains("{fullscreen_indicator}") && self.fullscreen_indicator.is_some() {
+ if content.contains("{fullscreen_indicator}")
+ && let Some(fullscreen_indicator) = self.fullscreen_indicator.clone()
+ {
content = content.replace(
"{fullscreen_indicator}",
if tab.is_fullscreen_active {
- self.fullscreen_indicator.as_ref().unwrap()
+ fullscreen_indicator.as_ref()
} else {
""
},
);
}
- if content.contains("{sync_indicator}") && self.sync_indicator.is_some() {
+ if content.contains("{sync_indicator}")
+ && let Some(sync_indicator) = self.sync_indicator.clone()
+ {
content = content.replace(
"{sync_indicator}",
if tab.is_sync_panes_active {
- self.sync_indicator.as_ref().unwrap()
+ sync_indicator.as_ref()
} else {
""
},
);
}
- if content.contains("{floating_indicator}") && self.floating_indicator.is_some() {
+ if content.contains("{floating_indicator}")
+ && let Some(floating_indicator) = self.floating_indicator.clone()
+ {
let panes_for_tab: Vec<PaneInfo> =
panes.panes.get(&tab.position).cloned().unwrap_or_default();
@@ -324,7 +330,7 @@ impl TabsWidget {
content = content.replace(
"{floating_indicator}",
if is_floating {
- self.floating_indicator.as_ref().unwrap()
+ floating_indicator.as_ref()
} else {
""
},