diff --git a/crates/gitnow/src/commands/root.rs b/crates/gitnow/src/commands/root.rs index bacb364..584c845 100644 --- a/crates/gitnow/src/commands/root.rs +++ b/crates/gitnow/src/commands/root.rs @@ -1,5 +1,3 @@ -use nucleo_matcher::{pattern::Pattern, Matcher, Utf32Str}; - use crate::{ app::App, cache::CacheApp, fuzzy_matcher::FuzzyMatcherApp, projects_list::ProjectsListApp, }; @@ -55,11 +53,11 @@ impl RootCommand { } trait StringExt { - fn as_str_vec<'a>(&'a self) -> Vec<&'a str>; + fn as_str_vec(&self) -> Vec<&str>; } impl StringExt for Vec { - fn as_str_vec<'a>(&'a self) -> Vec<&'a str> { + fn as_str_vec(&self) -> Vec<&str> { self.iter().map(|r| r.as_ref()).collect() } } diff --git a/crates/gitnow/src/fuzzy_matcher.rs b/crates/gitnow/src/fuzzy_matcher.rs index 63c22e7..3091ea7 100644 --- a/crates/gitnow/src/fuzzy_matcher.rs +++ b/crates/gitnow/src/fuzzy_matcher.rs @@ -11,7 +11,7 @@ impl FuzzyMatcher { pub fn match_pattern<'a>(&self, pattern: &'a str, items: &'a [&'a str]) -> Vec<&'a str> { let pat = Pattern::new( - &pattern, + pattern, nucleo_matcher::pattern::CaseMatching::Ignore, nucleo_matcher::pattern::Normalization::Smart, nucleo_matcher::pattern::AtomKind::Fuzzy, @@ -19,7 +19,7 @@ impl FuzzyMatcher { let mut matcher = Matcher::new(nucleo_matcher::Config::DEFAULT); let res = pat.match_list(items, &mut matcher); - res.into_iter().map(|((item, _))| *item).collect::>() + res.into_iter().map(|(item, _)| *item).collect::>() } } diff --git a/crates/gitnow/src/git_provider/github.rs b/crates/gitnow/src/git_provider/github.rs index d681e28..7091fed 100644 --- a/crates/gitnow/src/git_provider/github.rs +++ b/crates/gitnow/src/git_provider/github.rs @@ -1,10 +1,4 @@ -use anyhow::Context; -use octocrab::{ - auth::Auth, - models::{hooks::Config, Repository}, - params::repos::Sort, - NoSvc, Octocrab, Page, -}; +use octocrab::{models::Repository, params::repos::Sort, Octocrab, Page}; use crate::{app::App, config::GitHubAccessToken}; @@ -159,7 +153,7 @@ impl GitHubProvider { fn get_client( &self, - url: Option<&String>, + _url: Option<&String>, access_token: &GitHubAccessToken, ) -> anyhow::Result { let client = octocrab::Octocrab::builder()