From dbdecaf5a1c54a876b7ee0153d58dd39b1080f97 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 23 May 2026 23:14:52 +0900 Subject: refactor(semver): change ConstraintInterface to a closed enum Replace the dyn ConstraintInterface trait objects with an AnyConstraint enum closing over its four implementors (Simple, Multi, MatchAll, MatchNone), mirroring the earlier Rule enum conversion. Rename constraint.rs to simple_constraint.rs to match the renamed Constraint type. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../src/composer/semver/compiling_matcher.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/shirabe-external-packages/src/composer/semver/compiling_matcher.rs') diff --git a/crates/shirabe-external-packages/src/composer/semver/compiling_matcher.rs b/crates/shirabe-external-packages/src/composer/semver/compiling_matcher.rs index 246c4e5..b075ba7 100644 --- a/crates/shirabe-external-packages/src/composer/semver/compiling_matcher.rs +++ b/crates/shirabe-external-packages/src/composer/semver/compiling_matcher.rs @@ -1,18 +1,18 @@ -use shirabe_semver::constraint::ConstraintInterface; +use shirabe_semver::constraint::AnyConstraint; #[derive(Debug)] pub struct CompilingMatcher; impl CompilingMatcher { - pub fn r#match(_constraint: &dyn ConstraintInterface, _package: &dyn std::any::Any) -> bool { + pub fn r#match(_constraint: &AnyConstraint, _package: &dyn std::any::Any) -> bool { todo!() } - pub fn matches(_constraint: &dyn ConstraintInterface, _operator: i64, _version: &str) -> bool { + pub fn matches(_constraint: &AnyConstraint, _operator: i64, _version: &str) -> bool { todo!() } - pub fn match_(_constraint: &dyn ConstraintInterface, _operator: i64, _version: &str) -> bool { + pub fn match_(_constraint: &AnyConstraint, _operator: i64, _version: &str) -> bool { todo!() } -- cgit v1.3.1