diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-17 03:58:46 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-17 03:58:46 +0900 |
| commit | dc0cc70f6916810f326d6019a4bec90ca2915904 (patch) | |
| tree | 7e687ca2fe901d5ac97404222d426fdbc0748a1c /crates/shirabe/src/command/init_command.rs | |
| parent | 879affc50810e1ebb20687265a9a4e9801e21af2 (diff) | |
| download | php-shirabe-dc0cc70f6916810f326d6019a4bec90ca2915904.tar.gz php-shirabe-dc0cc70f6916810f326d6019a4bec90ca2915904.tar.zst php-shirabe-dc0cc70f6916810f326d6019a4bec90ca2915904.zip | |
refactor(preg): drop Option wrapper from matches arg of match_all*()
Every caller of Preg::match_all3()/is_match_all3() passed Some(&mut _),
so the argument is now a plain &mut. Preg::match_all() keeps the
no-captures form with a local throwaway map, and the arity suffixes are
renumbered accordingly (match_all2(), is_match_all()).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/init_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/init_command.rs | 2 |
1 files changed, 1 insertions, 1 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>> = |
