fix clippy nightly

This commit is contained in:
extrawurst 2022-11-23 15:14:12 +01:00
parent b987598c7b
commit 8d2de65868
3 changed files with 8 additions and 6 deletions

View File

@ -253,8 +253,8 @@ pub fn get_diff_commits(
///
//TODO: refactor into helper type with the inline closures as dedicated functions
#[allow(clippy::too_many_lines)]
fn raw_diff_to_file_diff<'a>(
diff: &'a Diff,
fn raw_diff_to_file_diff(
diff: &Diff,
work_dir: &Path,
) -> Result<FileDiff> {
let res = Rc::new(RefCell::new(FileDiff::default()));

View File

@ -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(

View File

@ -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()?;
}