diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-07 13:34:20 +0530 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-07 13:34:20 +0530 |
commit | f83942b40cd545ee7b6b18e091c273d27a8610a8 (patch) | |
tree | 20d3796dc15f969ce573451495905e687df01a99 /src/interactive/app | |
parent | 0994466c45e4a46769c6998d87cf532e80108af3 (diff) |
Happier clippy
Diffstat (limited to 'src/interactive/app')
-rw-r--r-- | src/interactive/app/handlers.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interactive/app/handlers.rs b/src/interactive/app/handlers.rs index ceddfd0..a63ab33 100644 --- a/src/interactive/app/handlers.rs +++ b/src/interactive/app/handlers.rs @@ -29,7 +29,9 @@ impl CursorDirection { impl TerminalApp { pub fn cycle_focus(&mut self) { use FocussedPane::*; - self.window.mark_pane.as_mut().map(|p| p.set_focus(false)); + if let Some(p) = self.window.mark_pane.as_mut() { + p.set_focus(false) + }; self.state.focussed = match ( self.state.focussed, &self.window.help_pane, @@ -70,7 +72,7 @@ impl TerminalApp { pub fn open_that(&mut self) { if let Some(ref idx) = self.state.selected { - open::that(path_of(&self.traversal.tree, *idx)).ok(); + open::that(path_of(&self.traversal.tree, *idx)).ok(); } } |