aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/forgejo_url.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/forgejo_url.rs')
-rw-r--r--crates/shirabe/src/util/forgejo_url.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/forgejo_url.rs b/crates/shirabe/src/util/forgejo_url.rs
index 7a5d2b10..e5304f5d 100644
--- a/crates/shirabe/src/util/forgejo_url.rs
+++ b/crates/shirabe/src/util/forgejo_url.rs
@@ -37,10 +37,7 @@ impl ForgejoUrl {
pub fn try_from(repo_url: Option<&str>) -> Option<Self> {
let repo_url = repo_url?;
- let mut matches = shirabe_pcre::PregMatchedGroups::new();
- if !Preg::match3(Self::URL_REGEX, repo_url, Some(&mut matches)) {
- return None;
- }
+ let matches = Preg::match3(Self::URL_REGEX, repo_url)?;
use shirabe_pcre::CaptureKey;
let m: Vec<String> = (0..5)
.map(|i| {