Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jubos committed Jun 22, 2024
1 parent 6ce3350 commit f46df28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f46df28

Please sign in to comment.