diff options
author | extrawurst <mail@rusticorn.com> | 2022-11-23 15:14:12 +0100 |
---|---|---|
committer | extrawurst <mail@rusticorn.com> | 2022-11-23 15:14:12 +0100 |
commit | 8d2de65868a4a4ea4b46af2dcd89dab43ce70b61 (patch) | |
tree | 14adb060af9a677ffac63718a304004065b93055 /src | |
parent | b987598c7be8441a3b02fb1c1cba03b4aa6db31e (diff) |
fix clippy nightly
Diffstat (limited to 'src')
-rw-r--r-- | src/app.rs | 2 | ||||
-rw-r--r-- | src/main.rs | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -445,7 +445,7 @@ impl App { self.process_queue(flags)?; } else if let InputEvent::State(polling_state) = ev { self.external_editor_popup.hide(); - if let InputState::Paused = polling_state { + if matches!(polling_state, InputState::Paused) { let result = match self.file_to_open.take() { Some(path) => { ExternalEditorComponent::open_file_in_editor( diff --git a/src/main.rs b/src/main.rs index 6a45b857..8a8d79e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -214,7 +214,7 @@ fn run_app( }; { - if let QueueEvent::SpinnerUpdate = event { + if matches!(event, QueueEvent::SpinnerUpdate) { spinner.update(); spinner.draw(terminal)?; continue; @@ -224,8 +224,10 @@ fn run_app( match event { QueueEvent::InputEvent(ev) => { - if let InputEvent::State(InputState::Polling) = ev - { + if matches!( + ev, + InputEvent::State(InputState::Polling) + ) { //Note: external ed closed, we need to re-hide cursor terminal.hide_cursor()?; } |