From 78157ab3ffeca37023381a422fccda2d4a0c64af Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 14 Jun 2026 04:01:45 +0900 Subject: refactor(pcre): drop strict-groups Preg variants Rust's type system already distinguishes participating from non-participating capture groups via Option, so the *StrictGroups methods add no safety here. Remove them and switch callers to the plain variants. --- .../pcre/unexpected_null_match_exception.rs | 29 ---------------------- 1 file changed, 29 deletions(-) delete mode 100644 crates/shirabe-external-packages/src/composer/pcre/unexpected_null_match_exception.rs (limited to 'crates/shirabe-external-packages/src/composer/pcre/unexpected_null_match_exception.rs') diff --git a/crates/shirabe-external-packages/src/composer/pcre/unexpected_null_match_exception.rs b/crates/shirabe-external-packages/src/composer/pcre/unexpected_null_match_exception.rs deleted file mode 100644 index 513870c..0000000 --- a/crates/shirabe-external-packages/src/composer/pcre/unexpected_null_match_exception.rs +++ /dev/null @@ -1,29 +0,0 @@ -//! ref: composer/vendor/composer/pcre/src/UnexpectedNullMatchException.php - -use super::pcre_exception::PcreException; - -#[derive(Debug)] -pub struct UnexpectedNullMatchException(pub PcreException); - -impl UnexpectedNullMatchException { - pub fn new(message: String) -> UnexpectedNullMatchException { - UnexpectedNullMatchException(PcreException(shirabe_php_shim::RuntimeException { - message, - code: 0, - })) - } - - pub fn from_function(_function: &str, _pattern: &str) -> UnexpectedNullMatchException { - panic!( - "fromFunction should not be called on UnexpectedNullMatchException, use PcreException" - ); - } -} - -impl std::fmt::Display for UnexpectedNullMatchException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.0) - } -} - -impl std::error::Error for UnexpectedNullMatchException {} -- cgit v1.3.1