From d5b313f388d424e60ae33ae58c1a65a65b24b8f1 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 6 Jun 2026 18:04:45 +0900 Subject: refactor(command): share Input/OutputInterface via Rc Convert InputInterface and OutputInterface parameters from &dyn/&mut dyn references to Rc> shared ownership across the command, console, and IO layers, matching the Phase C shared-ownership approach already used for IOInterface. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/home_command.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/command/home_command.rs') diff --git a/crates/shirabe/src/command/home_command.rs b/crates/shirabe/src/command/home_command.rs index db6f644..86909f5 100644 --- a/crates/shirabe/src/command/home_command.rs +++ b/crates/shirabe/src/command/home_command.rs @@ -69,14 +69,15 @@ impl HomeCommand { pub fn execute( &mut self, - input: &dyn InputInterface, - _output: &dyn OutputInterface, + input: std::rc::Rc>, + _output: std::rc::Rc>, ) -> Result { let repos = self.initialize_repos()?; let io = self.get_io().clone(); let mut return_code: i64 = 0; let packages: Vec = input + .borrow() .get_argument("packages") .as_list() .map(|l| { @@ -95,8 +96,12 @@ impl HomeCommand { packages }; - let show_homepage = input.get_option("homepage").as_bool().unwrap_or(false); - let show_only = input.get_option("show").as_bool().unwrap_or(false); + let show_homepage = input + .borrow() + .get_option("homepage") + .as_bool() + .unwrap_or(false); + let show_only = input.borrow().get_option("show").as_bool().unwrap_or(false); for package_name in &packages { let mut handled = false; -- cgit v1.3.1