From 78157ab3ffeca37023381a422fccda2d4a0c64af Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 14 Jun 2026 04:01:45 +0900 Subject: refactor(pcre): drop strict-groups Preg variants Rust's type system already distinguishes participating from non-participating capture groups via Option, so the *StrictGroups methods add no safety here. Remove them and switch callers to the plain variants. --- crates/shirabe/src/downloader/svn_downloader.rs | 27 ++++++++++++------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'crates/shirabe/src/downloader/svn_downloader.rs') diff --git a/crates/shirabe/src/downloader/svn_downloader.rs b/crates/shirabe/src/downloader/svn_downloader.rs index 95f25f8..e66d3ae 100644 --- a/crates/shirabe/src/downloader/svn_downloader.rs +++ b/crates/shirabe/src/downloader/svn_downloader.rs @@ -399,20 +399,19 @@ impl VcsDownloader for SvnDownloader { let url_pattern = "#(.*)#"; let mut matches: IndexMap = IndexMap::new(); - let base_url = if Preg::match_strict_groups3(url_pattern, &output, Some(&mut matches)) - .unwrap_or(false) - { - matches - .get(&CaptureKey::ByIndex(1)) - .cloned() - .unwrap_or_default() - } else { - return Err(RuntimeException { - message: format!("Unable to determine svn url for path {}", path), - code: 0, - } - .into()); - }; + let base_url = + if Preg::match3(url_pattern, &output, Some(&mut matches)).unwrap_or(false) { + matches + .get(&CaptureKey::ByIndex(1)) + .cloned() + .unwrap_or_default() + } else { + return Err(RuntimeException { + message: format!("Unable to determine svn url for path {}", path), + code: 0, + } + .into()); + }; // strip paths from references and only keep the actual revision let from_revision = -- cgit v1.3.1