From 1dfd1ae32b9b27573b9ee4439674091b792bcce0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 16 Aug 2026 20:20:15 +0900 Subject: refactor(preg): make preg_grep() return an iterator Callers had to build a temporary Vec<&str> at every call site to satisfy the &[&str] parameter. Taking IntoIterator and yielding the matched items lets them pass owned or borrowed strings directly. The flags variant and PREG_GREP_INVERT go away with it: no caller passes flags, and Composer's Preg::grep() has no such parameter either. --- crates/shirabe-symfony-process/src/process.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe-symfony-process') diff --git a/crates/shirabe-symfony-process/src/process.rs b/crates/shirabe-symfony-process/src/process.rs index 5307e1ae..045224c5 100644 --- a/crates/shirabe-symfony-process/src/process.rs +++ b/crates/shirabe-symfony-process/src/process.rs @@ -988,7 +988,7 @@ impl Process { .map(|spec| { format!( "\"{}\"", - preg_replace(php_regex!(r#"{(\\*+)"}"#), "$1$1\\\"", &spec,) + preg_replace(php_regex!(r#"{(\\*+)"}"#), "$1$1\\\"", &spec) ) }) }) -- cgit v1.3.1-4-g156e