diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-10 04:38:35 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-10 04:38:35 +0900 |
| commit | 9d9da0d1512202af7802d13b1c3c33a1a077a84e (patch) | |
| tree | abe363b266a61da1713c6a16702b84ea68c70882 /crates/shirabe-symfony-console/src/style/output_style.rs | |
| parent | f38080643d80b258393f2b7ab20349b122fe4591 (diff) | |
| download | php-shirabe-9d9da0d1512202af7802d13b1c3c33a1a077a84e.tar.gz php-shirabe-9d9da0d1512202af7802d13b1c3c33a1a077a84e.tar.zst php-shirabe-9d9da0d1512202af7802d13b1c3c33a1a077a84e.zip | |
refactor(symfony): hide leaf modules behind their parent re-exports
Every parent module in the symfony-* crates already re-exported its leaf
modules with `pub use`, so each item was reachable by two paths. Make the
leaf modules private and route all callers through the single re-exported
path.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-symfony-console/src/style/output_style.rs')
| -rw-r--r-- | crates/shirabe-symfony-console/src/style/output_style.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe-symfony-console/src/style/output_style.rs b/crates/shirabe-symfony-console/src/style/output_style.rs index 17c9489e..2881547d 100644 --- a/crates/shirabe-symfony-console/src/style/output_style.rs +++ b/crates/shirabe-symfony-console/src/style/output_style.rs @@ -3,8 +3,8 @@ use crate::formatter::OutputFormatterInterface; use crate::helper::ProgressBar; use crate::output::ConsoleOutputInterface; +use crate::output::OUTPUT_NORMAL; use crate::output::OutputInterface; -use crate::output::output_interface::OUTPUT_NORMAL; /// Decorates output to add console style guide helpers. #[derive(Debug)] @@ -50,7 +50,7 @@ impl OutputStyle { // 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()) - .downcast_ref::<crate::output::console_output::ConsoleOutput>() + .downcast_ref::<crate::output::ConsoleOutput>() .is_some() } @@ -58,11 +58,11 @@ impl OutputStyle { /// borrow of the concrete type serves as the cast result. fn as_console_output_interface( output: &std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>, - ) -> Option<std::cell::Ref<'_, crate::output::console_output::ConsoleOutput>> { + ) -> Option<std::cell::Ref<'_, crate::output::ConsoleOutput>> { std::cell::Ref::filter_map(output.borrow(), |output| { output .as_any() - .downcast_ref::<crate::output::console_output::ConsoleOutput>() + .downcast_ref::<crate::output::ConsoleOutput>() }) .ok() } |
