diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-05 02:36:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-05 02:36:13 +0900 |
| commit | 886ee829cb191745167dca369045acd3125e5714 (patch) | |
| tree | fc439e4b425dce6a10bbca92b305faef6bbb4def /crates/shirabe/src/command/init_command.rs | |
| parent | 222012294e953a0f5bf6e442b8a61116235c86b5 (diff) | |
| download | php-shirabe-886ee829cb191745167dca369045acd3125e5714.tar.gz php-shirabe-886ee829cb191745167dca369045acd3125e5714.tar.zst php-shirabe-886ee829cb191745167dca369045acd3125e5714.zip | |
feat(filter): share platform req filter via Rc, drop clone_box
PlatformRequirementFilterInterface::clone_box (a todo!() trait-object
clone stub) is removed in favor of Rc<dyn ...> shared ownership, matching
PHP's by-reference sharing of the single filter object. Box<dyn ...> is
replaced with Rc<dyn ...> across the factory, Solver/RuleSetGenerator,
VersionSelector, AutoloadGenerator, Installer and the command layer
(BaseCommand/PackageDiscoveryTrait and their impls); clone_box call
sites become Rc clones.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/init_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/init_command.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs index 053df36..e401534 100644 --- a/crates/shirabe/src/command/init_command.rs +++ b/crates/shirabe/src/command/init_command.rs @@ -73,8 +73,9 @@ impl PackageDiscoveryTrait for InitCommand { fn get_platform_requirement_filter( &self, input: &dyn InputInterface, - ) -> Box<dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface> - { + ) -> std::rc::Rc< + dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface, + > { todo!() } |
