From e752ff0a7e21334c0b9b9e1b87d4965ea8760fd5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 17 May 2026 21:24:24 +0900 Subject: fix(compile): convert Command struct to trait Symfony Command was a struct but used as dyn Trait (Box) in console/application.rs. Convert it to a trait with CommandBase as the concrete stub, and add impl Command for all Composer commands. --- crates/shirabe/src/command/self_update_command.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/command/self_update_command.rs') diff --git a/crates/shirabe/src/command/self_update_command.rs b/crates/shirabe/src/command/self_update_command.rs index 5f80516..c6ea1bd 100644 --- a/crates/shirabe/src/command/self_update_command.rs +++ b/crates/shirabe/src/command/self_update_command.rs @@ -4,6 +4,7 @@ use crate::io::io_interface; use anyhow::Result; use shirabe_external_packages::composer::pcre::preg::Preg; use shirabe_external_packages::symfony::component::console::command::command::Command; +use shirabe_external_packages::symfony::component::console::command::command::CommandBase; use shirabe_external_packages::symfony::component::console::input::input_interface::InputInterface; use shirabe_external_packages::symfony::component::console::output::output_interface::OutputInterface; use shirabe_external_packages::symfony::component::finder::finder::Finder; @@ -34,7 +35,7 @@ use crate::util::platform::Platform; #[derive(Debug)] pub struct SelfUpdateCommand { - inner: Command, + inner: CommandBase, composer: Option, io: Option>, } @@ -1184,11 +1185,11 @@ RGv89BPD+2DLnJysngsvVaUCAwEAAQ==\n\ } impl BaseCommand for SelfUpdateCommand { - fn inner(&self) -> &Command { + fn inner(&self) -> &CommandBase { &self.inner } - fn inner_mut(&mut self) -> &mut Command { + fn inner_mut(&mut self) -> &mut CommandBase { &mut self.inner } @@ -1208,3 +1209,5 @@ impl BaseCommand for SelfUpdateCommand { &mut self.io } } + +impl Command for SelfUpdateCommand {} -- cgit v1.3.1