mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-22 10:26:30 +00:00
Clippy fix (#119)
This commit is contained in:
parent
40a90c3869
commit
b9445f4764
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue