From fc39608de4226286c34aed0c0803edd15a8623a8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 03:44:17 +0900 Subject: refactor(installation-manager): cache installers by index, drop clone_box InstallationManager::get_installer cached a per-type installer via a Rust-only `clone_box` stub (`todo!()`). PHP caches the SAME instance held in `$this->installers`. Store the index into `installers` instead, reproducing that sharing without cloning; both `add_installer` and `remove_installer` clear the cache, so indices never dangle. With the only caller gone, `InstallerInterface::clone_box` is removed. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/installer/installer_interface.rs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'crates/shirabe/src/installer/installer_interface.rs') diff --git a/crates/shirabe/src/installer/installer_interface.rs b/crates/shirabe/src/installer/installer_interface.rs index 6df00c6..ff7708f 100644 --- a/crates/shirabe/src/installer/installer_interface.rs +++ b/crates/shirabe/src/installer/installer_interface.rs @@ -64,8 +64,4 @@ pub trait InstallerInterface: std::fmt::Debug { fn as_plugin_installer_mut(&mut self) -> Option<&mut PluginInstaller> { None } - - fn clone_box(&self) -> Box { - todo!() - } } -- cgit v1.3.1