From 716f44031a39c5e43fb441ecc470db76efc23dd4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 14 Jun 2026 11:24:36 +0900 Subject: refactor(pcre): drop Result from Preg method return types The Preg methods panic on PCRE failure (per the file header rationale), so their anyhow::Result wrappers never carried an Err. Co-Authored-By: Claude Opus 4.8 --- crates/shirabe/src/util/no_proxy_pattern.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src/util/no_proxy_pattern.rs') diff --git a/crates/shirabe/src/util/no_proxy_pattern.rs b/crates/shirabe/src/util/no_proxy_pattern.rs index dbca5d7..512b881 100644 --- a/crates/shirabe/src/util/no_proxy_pattern.rs +++ b/crates/shirabe/src/util/no_proxy_pattern.rs @@ -40,7 +40,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(r"{[\s,]+}", pattern).unwrap_or_default(); + let host_names = Preg::split(r"{[\s,]+}", pattern); let noproxy = host_names.is_empty() || host_names[0] == "*"; Self { host_names, -- cgit v1.3.1