diff options
Diffstat (limited to 'crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs')
| -rw-r--r-- | crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs b/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs index b0985e5..44c0d08 100644 --- a/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs +++ b/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs @@ -789,16 +789,16 @@ impl GitBitbucketDriver { _ => return, }; for clone_link in list { - if let PhpMixed::Array(m) = clone_link.as_ref() { - if m.get("name").and_then(|v| v.as_string()) == Some("https") { - // Format: https://(user@)bitbucket.org/{user}/{repo} - // Strip username from URL (only present in clone URL's for private repositories) - self.clone_https_url = Preg::replace( - r"/https:\/\/([^@]+@)?/", - "https://", - m.get("href").and_then(|v| v.as_string()).unwrap_or(""), - ); - } + if let PhpMixed::Array(m) = clone_link.as_ref() + && m.get("name").and_then(|v| v.as_string()) == Some("https") + { + // Format: https://(user@)bitbucket.org/{user}/{repo} + // Strip username from URL (only present in clone URL's for private repositories) + self.clone_https_url = Preg::replace( + r"/https:\/\/([^@]+@)?/", + "https://", + m.get("href").and_then(|v| v.as_string()).unwrap_or(""), + ); } } } |
