From bc4ebed1f7d7c336735ba1eed2c7cc58ca5e6659 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 22 Sep 2024 14:59:44 +0200 Subject: [PATCH] chore: fix warnings --- crates/gitnow/src/interactive.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/gitnow/src/interactive.rs b/crates/gitnow/src/interactive.rs index a105b9b..304ce90 100644 --- a/crates/gitnow/src/interactive.rs +++ b/crates/gitnow/src/interactive.rs @@ -38,7 +38,7 @@ mod app { crossterm::event::{self, Event, KeyCode}, layout::{Constraint, Layout}, style::{Style, Stylize}, - text::{Line, Span, Text}, + text::{Line, Span}, widgets::{ListItem, ListState, Paragraph, StatefulWidget}, DefaultTerminal, Frame, }; @@ -67,7 +67,7 @@ mod app { } fn update_matched_repos(&mut self) { - let mut res = self + let res = self .app .fuzzy_matcher() .match_repositories(&self.current_search, self.repositories); @@ -102,8 +102,7 @@ mod app { KeyCode::Esc => return Ok(None), KeyCode::Enter => { if let Some(selected) = self.list.selected() { - if let Some(repo) = self.matched_repos.iter().nth(selected).cloned() - { + if let Some(repo) = self.matched_repos.get(selected).cloned() { return Ok(Some(repo)); } }