aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/status_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-28 03:31:41 +0900
committernsfisis <nsfisis@gmail.com>2026-05-28 03:32:04 +0900
commitc7f53c5d7d581ebf76803650c63ec615b1558dc8 (patch)
treec6d83819e82a83cf93ca737b661094a8ea800cec /crates/shirabe/src/command/status_command.rs
parentcc5d73c05a0abca2eebcc8a6afa0b1543ee49850 (diff)
downloadphp-shirabe-c7f53c5d7d581ebf76803650c63ec615b1558dc8.tar.gz
php-shirabe-c7f53c5d7d581ebf76803650c63ec615b1558dc8.tar.zst
php-shirabe-c7f53c5d7d581ebf76803650c63ec615b1558dc8.zip
refactor(composer): represent composer via trait-based handlesrefactor/composer-handles
Replace the PartialComposer/Composer structs and the single Rc<RefCell<PartialOrFullComposer>> enum with PartialComposer and Composer traits (Composer: PartialComposer), InnerPartialComposer / InnerFullComposer data structs, and the handle types FullComposerHandle (impl Composer) and AnyComposerHandle (polymorphic enum, impl PartialComposer), plus their weak variants. Factory builds the full and partial graphs via separate Rc::new_cyclic branches that share a build_composer_base helper. Call sites now use trait methods that encapsulate borrowing instead of borrow_partial() / composer_full*(). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/status_command.rs')
-rw-r--r--crates/shirabe/src/command/status_command.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/shirabe/src/command/status_command.rs b/crates/shirabe/src/command/status_command.rs
index 9f66adf..87ab320 100644
--- a/crates/shirabe/src/command/status_command.rs
+++ b/crates/shirabe/src/command/status_command.rs
@@ -6,6 +6,7 @@ use shirabe_external_packages::symfony::component::console::input::InputInterfac
use shirabe_external_packages::symfony::component::console::output::OutputInterface;
use crate::command::{BaseCommand, BaseCommandData, HasBaseCommandData};
+use crate::composer::{Composer, PartialComposer};
use crate::console::input::InputOption;
use crate::io::IOInterface;
use crate::package::dumper::ArrayDumper;
@@ -85,7 +86,7 @@ impl StatusCommand {
fn do_execute(&mut self, input: &dyn InputInterface) -> Result<i64> {
let composer = self.require_composer(None, None)?;
- let mut composer = crate::command::composer_full_mut(&composer);
+ let composer = crate::command::composer_full(&composer);
// TODO(phase-b): release the &mut self borrow held by get_io via clone_box.
let io_box = self.get_io().clone();
let io_ref = io_box.borrow();