From 99a240da5fd3fa7aeb238678ca8319497d9da1e7 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Mon, 13 Apr 2020 01:38:13 +0200 Subject: [PATCH] clippy fix --- src/app.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.rs b/src/app.rs index 74d06db4..e3cf0ad5 100644 --- a/src/app.rs +++ b/src/app.rs @@ -489,7 +489,9 @@ impl App { } fn switch_focus(&mut self, f: Focus) -> NeedsUpdate { - if self.focus != f { + if self.focus == f { + NeedsUpdate::empty() + } else { self.focus = f; match self.focus { @@ -510,8 +512,6 @@ impl App { }; NeedsUpdate::DIFF | NeedsUpdate::COMMANDS - } else { - NeedsUpdate::empty() } }