diff options
Diffstat (limited to 'crates/shirabe/src/repository/composer_repository.rs')
| -rw-r--r-- | crates/shirabe/src/repository/composer_repository.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/crates/shirabe/src/repository/composer_repository.rs b/crates/shirabe/src/repository/composer_repository.rs index 6feb4359..d42a9778 100644 --- a/crates/shirabe/src/repository/composer_repository.rs +++ b/crates/shirabe/src/repository/composer_repository.rs @@ -251,8 +251,8 @@ impl ComposerRepository { ) { let proto = match_packagist .get(&CaptureKey::ByName("proto".to_string())) - .cloned() - .unwrap_or_default(); + .unwrap_or_default() + .to_string(); url = format!("{}://repo.packagist.org", proto); } @@ -786,12 +786,12 @@ impl ComposerRepository { { let q = match_groups .get(&CaptureKey::ByName("query".to_string())) - .cloned() - .unwrap_or_default(); + .unwrap_or_default() + .to_string(); let vendor = match_groups .get(&CaptureKey::ByName("vendor".to_string())) - .cloned() - .unwrap_or_default(); + .unwrap_or_default() + .to_string(); let url = format!( "{}?vendor={}&filter={}", list_url, @@ -2429,10 +2429,7 @@ impl ComposerRepository { if let Some(matches) = Preg::is_match3(php_regex!(r"{^[^:]++://[^/]*+}"), &self.url) { return Ok(format!( "{}{}", - matches - .get(&CaptureKey::ByIndex(0)) - .cloned() - .unwrap_or_default(), + matches.get(&CaptureKey::ByIndex(0)).unwrap_or_default(), url )); } |
