From 436e12381dd79e419dce755718be17b66d73e17f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 9 Jun 2026 00:09:08 +0900 Subject: feat(event-dispatcher): unify event dispatch via EventInterface trait Extract a superclass-trait EventInterface from the base Event. pool_builder's PrePoolCreateEvent stays deferred: its constructor needs owned, non-cloneable Request and repository boxes the builder only holds by reference (owned-payload blocker). The event is plugin-only, so its construction is re-tagged TODO(plugin). Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/update_command.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/command/update_command.rs') diff --git a/crates/shirabe/src/command/update_command.rs b/crates/shirabe/src/command/update_command.rs index a4fbf99..751203c 100644 --- a/crates/shirabe/src/command/update_command.rs +++ b/crates/shirabe/src/command/update_command.rs @@ -306,12 +306,11 @@ impl UpdateCommand { let mut command_event = CommandEvent::new(PluginEvents::COMMAND, "update", input.clone(), output); - // TODO(phase-b): dispatch should accept the CommandEvent itself; passing the - // event by name only for now to keep types aligned with EventDispatcher::dispatch. + let command_event_name = command_event.get_name().to_string(); composer .get_event_dispatcher() .borrow_mut() - .dispatch(Some(command_event.get_name()), None)?; + .dispatch(Some(&command_event_name), Some(&mut command_event))?; composer .get_installation_manager() -- cgit v1.3.1