diff options
Diffstat (limited to 'crates/shirabe/src')
| -rw-r--r-- | crates/shirabe/src/command/init_command.rs | 2 | ||||
| -rw-r--r-- | crates/shirabe/src/downloader/git_downloader.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs index 1ca3e428..af3d16e2 100644 --- a/crates/shirabe/src/command/init_command.rs +++ b/crates/shirabe/src/command/init_command.rs @@ -176,7 +176,7 @@ impl InitCommand { { *self.git_config.borrow_mut() = Some(IndexMap::new()); let mut m: IndexMap<CaptureKey, Vec<Option<String>>> = IndexMap::new(); - if Preg::is_match_all3(php_regex!(r"{^([^=]+)=(.*)$}m"), &output, Some(&mut m)) { + if Preg::is_match_all(php_regex!(r"{^([^=]+)=(.*)$}m"), &output, &mut m) { let keys: Vec<Option<String>> = m.get(&CaptureKey::ByIndex(1)).cloned().unwrap_or_default(); let values: Vec<Option<String>> = diff --git a/crates/shirabe/src/downloader/git_downloader.rs b/crates/shirabe/src/downloader/git_downloader.rs index b34f7800..7aeea252 100644 --- a/crates/shirabe/src/downloader/git_downloader.rs +++ b/crates/shirabe/src/downloader/git_downloader.rs @@ -110,10 +110,10 @@ impl GitDownloader { .unwrap_or_default(); let mut branches_match: IndexMap<CaptureKey, Vec<Option<String>>> = IndexMap::new(); - if !Preg::is_match_all3( + if !Preg::is_match_all( format!("{{^{} refs/heads/(.+)$}}mi", preg_quote(&head_ref, None)), &refs, - Some(&mut branches_match), + &mut branches_match, ) { // not on a branch, we are either on a not-modified tag or some sort of detached head, so skip this return Ok(None); @@ -138,13 +138,13 @@ impl GitDownloader { // try to find matching branch names in remote repos for candidate in &candidate_branches { let mut m: IndexMap<CaptureKey, Vec<Option<String>>> = IndexMap::new(); - if Preg::is_match_all3( + if Preg::is_match_all( format!( "{{^[a-f0-9]+ refs/remotes/((?:[^/]+)/{})$}}mi", preg_quote(candidate, None) ), &refs, - Some(&mut m), + &mut m, ) { let matches: Vec<Option<String>> = m.get(&CaptureKey::ByIndex(1)).cloned().unwrap_or_default(); |
