From b6604e1395f003748fe40a44e1190470632a40ce Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 16 Aug 2026 19:06:49 +0900 Subject: refactor(preg): import preg_*() instead of qualifying them Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe-symfony-console/src/command/command.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/shirabe-symfony-console/src/command/command.rs') diff --git a/crates/shirabe-symfony-console/src/command/command.rs b/crates/shirabe-symfony-console/src/command/command.rs index 6f25595b..b2af47e2 100644 --- a/crates/shirabe-symfony-console/src/command/command.rs +++ b/crates/shirabe-symfony-console/src/command/command.rs @@ -11,7 +11,7 @@ use crate::input::InputInterface; use crate::input::InputOption; use crate::output::OutputInterface; use indexmap::IndexMap; -use shirabe_php_shim::{PhpMixed, php_regex}; +use shirabe_php_shim::{PhpMixed, php_regex, preg_match}; use std::cell::{Cell, Ref}; /// The base-class state of the PHP `Command` class. @@ -109,8 +109,7 @@ impl CommandData { /// Throws InvalidArgumentException when the name is invalid. fn validate_name(&self, name: &str) -> anyhow::Result> { let mut matches: Vec> = Vec::new(); - if !shirabe_php_shim::preg_match(php_regex!(r"/^[^\:]++(\:[^\:]++)*$/"), name, &mut matches) - { + if !preg_match(php_regex!(r"/^[^\:]++(\:[^\:]++)*$/"), name, &mut matches) { return Ok(Err(InvalidArgumentException::new(format!( "Command name \"{}\" is invalid.", name -- cgit v1.3.1-4-g156e