From 27d00055df8691a6bd99aaf38633a7338b16cc6a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 11 Jul 2026 16:33:05 +0900 Subject: chore: use fully-qualified name for Rc/RefCell --- .../src/symfony/console/helper/process_helper.rs | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'crates/shirabe-external-packages/src/symfony/console/helper/process_helper.rs') diff --git a/crates/shirabe-external-packages/src/symfony/console/helper/process_helper.rs b/crates/shirabe-external-packages/src/symfony/console/helper/process_helper.rs index 28e2329a..58d1ea3f 100644 --- a/crates/shirabe-external-packages/src/symfony/console/helper/process_helper.rs +++ b/crates/shirabe-external-packages/src/symfony/console/helper/process_helper.rs @@ -8,8 +8,6 @@ use crate::symfony::console::output::ConsoleOutputInterface; use crate::symfony::console::output::output_interface::{self, OutputInterface}; use crate::symfony::process::exception::process_failed_exception::ProcessFailedException; use crate::symfony::process::process::Process; -use std::cell::RefCell; -use std::rc::Rc; /// The ProcessHelper class provides helpers to run external processes. /// @@ -41,7 +39,7 @@ impl ProcessHelper { /// output available on STDOUT or STDERR pub fn run( &self, - output: Rc>, + output: std::rc::Rc>, cmd: ProcessHelperCmd, error: Option<&str>, callback: Option>, @@ -54,14 +52,14 @@ impl ProcessHelper { // $output->getErrorOutput(); }`. ConsoleOutput is the only OutputInterface // implementor that also implements ConsoleOutputInterface, so the check // reduces to a downcast to the concrete type. - let output: Rc> = { + let output: std::rc::Rc> = { let redirected = shirabe_php_shim::AsAny::as_any(&*output.borrow()) .downcast_ref::() .map(|console| console.get_error_output()); redirected.unwrap_or(output) }; - let formatter: Rc> = self + let formatter: std::rc::Rc> = self .get_helper_set() .unwrap() .borrow() @@ -200,7 +198,7 @@ impl ProcessHelper { /// @see run() pub fn must_run( &self, - output: Rc>, + output: std::rc::Rc>, cmd: ProcessHelperCmd, error: Option<&str>, callback: Option>, @@ -223,7 +221,7 @@ impl ProcessHelper { /// Wraps a Process callback to add debugging output. pub fn wrap_callback( &self, - output: Rc>, + output: std::rc::Rc>, process: &Process, mut callback: Option>, ) -> Box { @@ -231,14 +229,14 @@ impl ProcessHelper { // $output->getErrorOutput(); }`. ConsoleOutput is the only OutputInterface // implementor that also implements ConsoleOutputInterface, so the check // reduces to a downcast to the concrete type. - let output: Rc> = { + let output: std::rc::Rc> = { let redirected = shirabe_php_shim::AsAny::as_any(&*output.borrow()) .downcast_ref::() .map(|console| console.get_error_output()); redirected.unwrap_or(output) }; - let formatter: Rc> = self + let formatter: std::rc::Rc> = self .get_helper_set() .unwrap() .borrow() @@ -272,7 +270,7 @@ impl ProcessHelper { } fn formatter_start( - formatter: &Rc>, + formatter: &std::rc::Rc>, id: &str, message: &str, ) -> String { @@ -280,7 +278,7 @@ impl ProcessHelper { } fn formatter_stop( - formatter: &Rc>, + formatter: &std::rc::Rc>, id: &str, message: &str, successful: bool, @@ -289,7 +287,7 @@ impl ProcessHelper { } fn formatter_progress( - formatter: &Rc>, + formatter: &std::rc::Rc>, id: &str, buffer: &str, error: bool, @@ -301,11 +299,11 @@ impl ProcessHelper { } impl HelperInterface for ProcessHelper { - fn set_helper_set(&mut self, helper_set: Option>>) { + fn set_helper_set(&mut self, helper_set: Option>>) { self.inner.set_helper_set(helper_set); } - fn get_helper_set(&self) -> Option>> { + fn get_helper_set(&self) -> Option>> { self.inner.get_helper_set() } -- cgit v1.3.1