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/style/output_style.rs | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'crates/shirabe-external-packages/src/symfony/console/style/output_style.rs') diff --git a/crates/shirabe-external-packages/src/symfony/console/style/output_style.rs b/crates/shirabe-external-packages/src/symfony/console/style/output_style.rs index 9a162746..12fd3dcb 100644 --- a/crates/shirabe-external-packages/src/symfony/console/style/output_style.rs +++ b/crates/shirabe-external-packages/src/symfony/console/style/output_style.rs @@ -7,17 +7,15 @@ use crate::symfony::console::output::OutputInterface; use crate::symfony::console::output::output_interface::OUTPUT_NORMAL; use crate::symfony::console::style::style_interface::StyleInterface; use shirabe_php_shim::PhpMixed; -use std::cell::RefCell; -use std::rc::Rc; /// Decorates output to add console style guide helpers. #[derive(Debug)] pub struct OutputStyle { - output: Rc>, + output: std::rc::Rc>, } impl OutputStyle { - pub fn new(output: Rc>) -> Self { + pub fn new(output: std::rc::Rc>) -> Self { Self { output } } @@ -25,7 +23,7 @@ impl OutputStyle { ProgressBar::new(self.output.clone(), max, 1.0 / 25.0) } - pub(crate) fn get_error_output(&self) -> Rc> { + pub(crate) fn get_error_output(&self) -> std::rc::Rc> { // PHP checks `$this->output instanceof ConsoleOutputInterface`; this requires // runtime type information that the OutputInterface trait object lacks. if !Self::is_console_output_interface(&self.output) { @@ -38,7 +36,9 @@ impl OutputStyle { .get_error_output() } - fn is_console_output_interface(output: &Rc>) -> bool { + fn is_console_output_interface( + output: &std::rc::Rc>, + ) -> bool { // ConsoleOutput is the only OutputInterface implementor that also implements // ConsoleOutputInterface, so `instanceof ConsoleOutputInterface` reduces to this downcast. shirabe_php_shim::AsAny::as_any(&*output.borrow()) @@ -47,8 +47,8 @@ impl OutputStyle { } fn as_console_output_interface( - _output: &Rc>, - ) -> Option>> { + _output: &std::rc::Rc>, + ) -> Option>> { todo!() } } @@ -94,11 +94,14 @@ impl OutputInterface for OutputStyle { self.output.borrow().is_decorated() } - fn set_formatter(&self, formatter: Rc>) { + fn set_formatter( + &self, + formatter: std::rc::Rc>, + ) { self.output.borrow().set_formatter(formatter); } - fn get_formatter(&self) -> Rc> { + fn get_formatter(&self) -> std::rc::Rc> { self.output.borrow().get_formatter() } } -- cgit v1.3.1