aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/console/style/output_style.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/style/output_style.rs')
-rw-r--r--crates/shirabe-external-packages/src/symfony/console/style/output_style.rs23
1 files changed, 13 insertions, 10 deletions
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<RefCell<dyn OutputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
}
impl OutputStyle {
- pub fn new(output: Rc<RefCell<dyn OutputInterface>>) -> Self {
+ pub fn new(output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>) -> 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<RefCell<dyn OutputInterface>> {
+ pub(crate) fn get_error_output(&self) -> std::rc::Rc<std::cell::RefCell<dyn OutputInterface>> {
// 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<RefCell<dyn OutputInterface>>) -> bool {
+ fn is_console_output_interface(
+ output: &std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
+ ) -> 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<RefCell<dyn OutputInterface>>,
- ) -> Option<Rc<RefCell<dyn ConsoleOutputInterface>>> {
+ _output: &std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
+ ) -> Option<std::rc::Rc<std::cell::RefCell<dyn ConsoleOutputInterface>>> {
todo!()
}
}
@@ -94,11 +94,14 @@ impl OutputInterface for OutputStyle {
self.output.borrow().is_decorated()
}
- fn set_formatter(&self, formatter: Rc<RefCell<dyn OutputFormatterInterface>>) {
+ fn set_formatter(
+ &self,
+ formatter: std::rc::Rc<std::cell::RefCell<dyn OutputFormatterInterface>>,
+ ) {
self.output.borrow().set_formatter(formatter);
}
- fn get_formatter(&self) -> Rc<RefCell<dyn OutputFormatterInterface>> {
+ fn get_formatter(&self) -> std::rc::Rc<std::cell::RefCell<dyn OutputFormatterInterface>> {
self.output.borrow().get_formatter()
}
}