From ec5c2a1991554a2ebb951119a52931b140f49931 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 20:49:03 +0100 Subject: [PATCH] flip boolean block (clippy::if_not_else) --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5a98350..4bb2b78 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1201,10 +1201,10 @@ impl App { hold: profile.hold, env: HashMap::new(), }; - let tab_title_override = if !profile.tab_title.is_empty() { - Some(profile.tab_title.clone()) - } else { + let tab_title_override = if profile.tab_title.is_empty() { None + } else { + Some(profile.tab_title.clone()) }; (options, tab_title_override) } @@ -1455,10 +1455,10 @@ impl Application for App { } fn on_context_drawer(&mut self) -> Command { - if !self.core.window.show_context { - self.update_focus() - } else { + if self.core.window.show_context { Command::none() + } else { + self.update_focus() } }