From f46df288227707e2c9e14f9d593bdebe84ec3042 Mon Sep 17 00:00:00 2001 From: Curtis Spencer <41347+jubos@users.noreply.github.com> Date: Sat, 22 Jun 2024 22:45:55 +0000 Subject: [PATCH] Fix clippy warnings --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5bd4f72dcf..33025e97ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -140,12 +140,12 @@ enum RepoUrlType { InvalidUrl, } -fn parse_repo_url_type(link: &str) -> RepoUrlType { - match url::Url::parse(&link) { +fn parse_repo_url_type(url: &str) -> RepoUrlType { + match url::Url::parse(url) { Ok(parsed) => match parsed.host_str() { Some(host) => match host { "github.com" | "www.github.com" => { - if link.ends_with("/") { + if url.ends_with('/') { RepoUrlType::GithubUnnormalized } else { let parts: Vec<&str> = parsed.path().split('/').collect();