diff options
Diffstat (limited to 'crates/shirabe/src/util')
| -rw-r--r-- | crates/shirabe/src/util/no_proxy_pattern.rs | 6 | ||||
| -rw-r--r-- | crates/shirabe/src/util/process_executor.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/shirabe/src/util/no_proxy_pattern.rs b/crates/shirabe/src/util/no_proxy_pattern.rs index 85e1f472..cd54fa1a 100644 --- a/crates/shirabe/src/util/no_proxy_pattern.rs +++ b/crates/shirabe/src/util/no_proxy_pattern.rs @@ -1,10 +1,10 @@ //! ref: composer/src/Composer/Util/NoProxyPattern.php use indexmap::IndexMap; -use shirabe_pcre::Preg; use shirabe_php_shim::{ RuntimeException, array_key_exists, explode, filter_var_int_with_range, filter_var_ip, - inet_pton, ltrim, parse_url, php_regex, stripos, strlen, strpbrk, strpos, substr, substr_count, + inet_pton, ltrim, parse_url, php_regex, preg_split, stripos, strlen, strpbrk, strpos, substr, + substr_count, }; /// Tests URLs against NO_PROXY patterns @@ -37,7 +37,7 @@ impl NoProxyPattern { /// @param string $pattern NO_PROXY pattern pub fn new(pattern: &str) -> Self { // PHP: Preg::split('{[\s,]+}', $pattern, -1, PREG_SPLIT_NO_EMPTY) - let host_names = Preg::split(php_regex!(r"{[\s,]+}"), pattern); + let host_names = preg_split(php_regex!(r"{[\s,]+}"), pattern); let noproxy = host_names.is_empty() || host_names[0] == "*"; Self { host_names, diff --git a/crates/shirabe/src/util/process_executor.rs b/crates/shirabe/src/util/process_executor.rs index 875c8810..fc67604e 100644 --- a/crates/shirabe/src/util/process_executor.rs +++ b/crates/shirabe/src/util/process_executor.rs @@ -12,7 +12,7 @@ use shirabe_php_shim::Catch as _; use shirabe_php_shim::{ LogicException, PHP_EOL, PhpMixed, RuntimeException, array_intersect, array_map, escapeshellarg, explode, implode, in_array_strict, is_array, is_dir, is_numeric, is_string, - php_regex, rtrim, str_replace, strcspn, strlen, strpbrk, strtolower, strtr_array, + php_regex, preg_split, rtrim, str_replace, strcspn, strlen, strpbrk, strtolower, strtr_array, substr_replace, trim, }; use shirabe_symfony_process::ExecutableFinder; @@ -779,7 +779,7 @@ impl ProcessExecutor { if output.is_empty() { vec![] } else { - Preg::split(php_regex!(r"{\r?\n}"), &output) + preg_split(php_regex!(r"{\r?\n}"), &output) } } |
