From 6d53dd16759df8b2cde09047ddcf460652034fd9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 27 Jun 2026 04:52:00 +0900 Subject: refactor(command): replace composer_full_mut with shared composer_full The compiler confirms none of the call sites invoke a &mut self method on the returned Composer, so the exclusive RefMut borrow was never needed and only risked borrow check conflict. Switch every site to the shared composer_full borrow and drop the now-dead composer_full_mut helper. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/exec_command.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/command/exec_command.rs') diff --git a/crates/shirabe/src/command/exec_command.rs b/crates/shirabe/src/command/exec_command.rs index 2fc23f0..8f3a0b5 100644 --- a/crates/shirabe/src/command/exec_command.rs +++ b/crates/shirabe/src/command/exec_command.rs @@ -39,7 +39,7 @@ impl ExecCommand { fn get_binaries(&self, for_display: bool) -> Result> { let composer = self.require_composer(None, None)?; - let composer_ref = crate::command::composer_full_mut(&composer); + let composer_ref = crate::composer::composer_full(&composer); let bin_dir = composer_ref .get_config() .borrow_mut() @@ -155,7 +155,7 @@ impl Command for ExecCommand { { let bins = self.get_binaries(true)?; if bins.is_empty() { - let bin_dir = crate::command::composer_full_mut(&composer) + let bin_dir = crate::composer::composer_full(&composer) .get_config() .borrow_mut() .get("bin-dir") @@ -188,7 +188,7 @@ impl Command for ExecCommand { .unwrap_or("") .to_string(); - let dispatcher = crate::command::composer_full(&composer) + let dispatcher = crate::composer::composer_full(&composer) .get_event_dispatcher() .clone(); dispatcher.borrow_mut().add_listener( -- cgit v1.3.1