Skip to content

Commit 702f95d

Browse files
Update src/utils/vcs.rs
Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
1 parent 4737dbb commit 702f95d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils/vcs.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@ impl VcsUrl {
209209

210210
fn extract_provider_name(host: &str) -> &str {
211211
let trimmed = host.trim_end_matches('.');
212-
let mut iter = trimmed.rsplit('.');
213-
iter.next(); // skip TLD
214-
iter.next().unwrap_or(trimmed).to_owned()
212+
trimmed.rsplit('.').nth(1).unwrap_or(trimmed)
215213
}
216214

217215
fn is_matching_url(a: &str, b: &str) -> bool {

0 commit comments

Comments
 (0)