diff --git a/src/engine/machines/analyzer.rs b/src/engine/machines/analyzer.rs index 2d66cd7..1ad44d8 100644 --- a/src/engine/machines/analyzer.rs +++ b/src/engine/machines/analyzer.rs @@ -29,7 +29,7 @@ impl DependencyAnalyzer { ver: &Version, advisory_db: Option<&Database>, ) { - if dep.required.matches(&ver) { + if dep.required.matches(ver) { if let Some(ref mut current_latest_that_matches) = dep.latest_that_matches { if *current_latest_that_matches < *ver { *current_latest_that_matches = ver.clone(); diff --git a/src/models/repo.rs b/src/models/repo.rs index f97c7e2..237802d 100644 --- a/src/models/repo.rs +++ b/src/models/repo.rs @@ -57,7 +57,7 @@ pub enum RepoSite { } impl RepoSite { - pub fn to_base_uri(&self) -> &'static str { + pub fn to_base_uri(self) -> &'static str { match self { RepoSite::Github => "https://github.com", RepoSite::Gitlab => "https://gitlab.com", @@ -65,7 +65,7 @@ impl RepoSite { } } - pub fn to_usercontent_base_uri(&self) -> &'static str { + pub fn to_usercontent_base_uri(self) -> &'static str { match self { RepoSite::Github => "https://raw.githubusercontent.com", RepoSite::Gitlab => "https://gitlab.com", @@ -73,7 +73,7 @@ impl RepoSite { } } - pub fn to_usercontent_repo_suffix(&self) -> &'static str { + pub fn to_usercontent_repo_suffix(self) -> &'static str { match self { RepoSite::Github => "HEAD", RepoSite::Gitlab | RepoSite::Bitbucket => "raw/HEAD",