diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-14 11:24:36 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-14 11:28:19 +0900 |
| commit | 716f44031a39c5e43fb441ecc470db76efc23dd4 (patch) | |
| tree | e6f4a31e4bf55a0a8efb06d9dd4844c567e7390f /crates/shirabe/src/plugin | |
| parent | ef9118c788c1cbb22ca7721b6a9e40c2bf2fe243 (diff) | |
| download | php-shirabe-716f44031a39c5e43fb441ecc470db76efc23dd4.tar.gz php-shirabe-716f44031a39c5e43fb441ecc470db76efc23dd4.tar.zst php-shirabe-716f44031a39c5e43fb441ecc470db76efc23dd4.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/plugin')
| -rw-r--r-- | crates/shirabe/src/plugin/plugin_manager.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/plugin/plugin_manager.rs b/crates/shirabe/src/plugin/plugin_manager.rs index 24899cd..25953ab 100644 --- a/crates/shirabe/src/plugin/plugin_manager.rs +++ b/crates/shirabe/src/plugin/plugin_manager.rs @@ -257,7 +257,7 @@ impl PluginManager { } if package.get_name() == "symfony/flex" - && Preg::is_match3("{^[0-9.]+$}", &package.get_version(), None).unwrap_or(false) + && Preg::is_match3("{^[0-9.]+$}", &package.get_version(), None) && version_compare(&package.get_version(), "1.9.8", "<") { self.io.write_error(&format!("<warning>The \"{}\" plugin {}was skipped because it is not compatible with Composer 2+. Make sure to update it to version 1.9.8 or greater.</warning>", @@ -846,7 +846,7 @@ impl PluginManager { .map(|(k, v)| (k.clone(), *v)) .collect(); for (pattern, allow) in &rules_snapshot { - if Preg::is_match3(pattern, package, None).unwrap_or(false) { + if Preg::is_match3(pattern, package, None) { return Ok(*allow); } } |
