diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-08 02:44:38 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-08 02:44:38 +0900 |
| commit | 243450fee9853c2fea66ae0642dabb8db5227d6f (patch) | |
| tree | 8a3ee16555d04835ef7afad576942b642bfdcfa6 /crates/shirabe-external-packages/src | |
| parent | 06368584a9277022d9cfc42d22c37f4cc6e580f8 (diff) | |
| download | php-shirabe-243450fee9853c2fea66ae0642dabb8db5227d6f.tar.gz php-shirabe-243450fee9853c2fea66ae0642dabb8db5227d6f.tar.zst php-shirabe-243450fee9853c2fea66ae0642dabb8db5227d6f.zip | |
feat(phase-c): resolve closure-capture phase-b TODOs in config/create-project
Port Config::process() to the real Preg::replace_callback, whose closure
borrows &self/flags and calls get_with_flags; surface get() errors via a
captured cell so process now returns Result. Switch the replace_callback
shim bounds to FnMut to allow the error-capturing closure.
Wire CreateProjectCommand suggestion collection through the
Rc<RefCell> reporter's interior mutation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src')
| -rw-r--r-- | crates/shirabe-external-packages/src/composer/pcre/preg.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe-external-packages/src/composer/pcre/preg.rs b/crates/shirabe-external-packages/src/composer/pcre/preg.rs index e16643a..ea189eb 100644 --- a/crates/shirabe-external-packages/src/composer/pcre/preg.rs +++ b/crates/shirabe-external-packages/src/composer/pcre/preg.rs @@ -211,7 +211,7 @@ impl Preg { todo!() } - pub fn replace_callback<F: Fn(&indexmap::IndexMap<CaptureKey, String>) -> String>( + pub fn replace_callback<F: FnMut(&indexmap::IndexMap<CaptureKey, String>) -> String>( _pattern: &str, _replacement: F, _subject: &str, @@ -219,7 +219,7 @@ impl Preg { todo!() } - pub fn replace_callback4<F: Fn(&indexmap::IndexMap<CaptureKey, String>) -> String>( + pub fn replace_callback4<F: FnMut(&indexmap::IndexMap<CaptureKey, String>) -> String>( _pattern: &str, _replacement: F, _subject: &str, @@ -228,7 +228,7 @@ impl Preg { todo!() } - pub fn replace_callback5<F: Fn(&indexmap::IndexMap<CaptureKey, String>) -> String>( + pub fn replace_callback5<F: FnMut(&indexmap::IndexMap<CaptureKey, String>) -> String>( _pattern: &str, _replacement: F, _subject: &str, @@ -238,7 +238,7 @@ impl Preg { todo!() } - pub fn replace_callback6<F: Fn(&indexmap::IndexMap<CaptureKey, String>) -> String>( + pub fn replace_callback6<F: FnMut(&indexmap::IndexMap<CaptureKey, String>) -> String>( _pattern: &str, _replacement: F, _subject: &str, |
