From 886ee829cb191745167dca369045acd3125e5714 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 5 Jun 2026 02:36:13 +0900 Subject: 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 shared ownership, matching PHP's by-reference sharing of the single filter object. Box is replaced with Rc 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) --- crates/shirabe/src/command/init_command.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/command/init_command.rs') 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 - { + ) -> std::rc::Rc< + dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface, + > { todo!() } -- cgit v1.3.1