diff options
Diffstat (limited to 'crates/shirabe-php-shim/src/preg.rs')
| -rw-r--r-- | crates/shirabe-php-shim/src/preg.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe-php-shim/src/preg.rs b/crates/shirabe-php-shim/src/preg.rs index 46d9428..6bf8900 100644 --- a/crates/shirabe-php-shim/src/preg.rs +++ b/crates/shirabe-php-shim/src/preg.rs @@ -99,7 +99,7 @@ pub fn preg_match_all_set_order( count } -pub fn preg_grep(pattern: &str, input: &Vec<String>) -> Vec<String> { +pub fn preg_grep(pattern: &str, input: &[String]) -> Vec<String> { let re = compile_php_pattern(pattern).unwrap_or_else(|e| panic!("invalid regex: {e}")); input.iter().filter(|s| re.is_match(s)).cloned().collect() } |
