diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-20 03:44:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-20 13:14:28 +0900 |
| commit | 1afc35c977eb443967fc768d67057a28b56ba15b (patch) | |
| tree | 4a12f8af4f4051e2671935bd7c5d7841473a6d09 /crates/shirabe/src/plugin/plugin_interface.rs | |
| parent | d71b364022aee57806a47726622e0ce0968c9251 (diff) | |
| download | php-shirabe-1afc35c977eb443967fc768d67057a28b56ba15b.tar.gz php-shirabe-1afc35c977eb443967fc768d67057a28b56ba15b.tar.zst php-shirabe-1afc35c977eb443967fc768d67057a28b56ba15b.zip | |
refactor(plugin): return borrowed plugins from get_plugins, drop clone_box
PluginManager::get_plugins cloned each plugin through a Rust-only
`clone_box` stub (`todo!()`). PHP's getPlugins() returns `$this->plugins`
directly and the objects are shared by reference, so borrow the stored
instances (`&[Box<dyn PluginInterface>]`) instead of cloning. The sole
caller is adjusted and `PluginInterface::clone_box` is removed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/plugin/plugin_interface.rs')
| -rw-r--r-- | crates/shirabe/src/plugin/plugin_interface.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/crates/shirabe/src/plugin/plugin_interface.rs b/crates/shirabe/src/plugin/plugin_interface.rs index d335bf0..486dbea 100644 --- a/crates/shirabe/src/plugin/plugin_interface.rs +++ b/crates/shirabe/src/plugin/plugin_interface.rs @@ -15,10 +15,6 @@ pub trait PluginInterface: std::fmt::Debug { fn uninstall(&mut self, composer: &ComposerHandle, io: Rc<RefCell<dyn IOInterface>>); - fn clone_box(&self) -> Box<dyn PluginInterface> { - todo!() - } - // TODO(plugin): PHP-side `instanceof` checks for EventSubscriberInterface / Capable. // EventSubscriberInterface is not dyn-compatible (its only method is associated, not // a `&self` method), so we expose a boolean predicate instead. |
