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/home_command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 0a0a36c..bde9fc2 100644 --- a/crates/shirabe/src/command/home_command.rs +++ b/crates/shirabe/src/command/home_command.rs @@ -111,7 +111,7 @@ impl HomeCommand { let composer = self.try_composer(None, None); if let Some(composer) = composer { - let composer = crate::command::composer_full(&composer); + let composer = crate::composer::composer_full(&composer); let mut repos: Vec = vec![]; repos.push(crate::repository::RepositoryInterfaceHandle::new( RootPackageRepository::new(crate::package::RootPackageInterfaceHandle::dup( @@ -199,7 +199,7 @@ impl Command for HomeCommand { let packages = if packages.is_empty() { io.write_error("No package specified, opening homepage for the root package"); let composer_rc = self.require_composer(None, None)?; - let composer_ref = crate::command::composer_full(&composer_rc); + let composer_ref = crate::composer::composer_full(&composer_rc); vec![composer_ref.get_package().get_name().to_string()] } else { packages -- cgit v1.3.1