Skip to content

Commit 99a240d

Browse files
author
Stephan Dilly
committed
clippy fix
1 parent b0b1f7d commit 99a240d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,9 @@ impl App {
489489
}
490490

491491
fn switch_focus(&mut self, f: Focus) -> NeedsUpdate {
492-
if self.focus != f {
492+
if self.focus == f {
493+
NeedsUpdate::empty()
494+
} else {
493495
self.focus = f;
494496

495497
match self.focus {
@@ -510,8 +512,6 @@ impl App {
510512
};
511513

512514
NeedsUpdate::DIFF | NeedsUpdate::COMMANDS
513-
} else {
514-
NeedsUpdate::empty()
515515
}
516516
}
517517

0 commit comments

Comments
 (0)