Clippy fix (#119)

This commit is contained in:
Eduardo Pinho 2021-08-22 08:50:38 +01:00 committed by GitHub
parent 40a90c3869
commit b9445f4764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -29,7 +29,7 @@ impl DependencyAnalyzer {
ver: &Version, ver: &Version,
advisory_db: Option<&Database>, 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 let Some(ref mut current_latest_that_matches) = dep.latest_that_matches {
if *current_latest_that_matches < *ver { if *current_latest_that_matches < *ver {
*current_latest_that_matches = ver.clone(); *current_latest_that_matches = ver.clone();

View file

@ -57,7 +57,7 @@ pub enum RepoSite {
} }
impl RepoSite { impl RepoSite {
pub fn to_base_uri(&self) -> &'static str { pub fn to_base_uri(self) -> &'static str {
match self { match self {
RepoSite::Github => "https://github.com", RepoSite::Github => "https://github.com",
RepoSite::Gitlab => "https://gitlab.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 { match self {
RepoSite::Github => "https://raw.githubusercontent.com", RepoSite::Github => "https://raw.githubusercontent.com",
RepoSite::Gitlab => "https://gitlab.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 { match self {
RepoSite::Github => "HEAD", RepoSite::Github => "HEAD",
RepoSite::Gitlab | RepoSite::Bitbucket => "raw/HEAD", RepoSite::Gitlab | RepoSite::Bitbucket => "raw/HEAD",