aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-semver
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-19 21:46:01 +0900
committernsfisis <nsfisis@gmail.com>2026-05-19 21:46:08 +0900
commit5e31fa33c3b5cf726a57a063b8e7a070869250fe (patch)
tree98522466966fa7df483cad174ab5fc03db39bc09 /crates/shirabe-semver
parentc839244d8d09f3036ebfee8eef7eb6b147e593ab (diff)
downloadphp-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.tar.gz
php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.tar.zst
php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.zip
fix(compile): fix more random compile errors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-semver')
-rw-r--r--crates/shirabe-semver/src/constraint/constraint.rs7
-rw-r--r--crates/shirabe-semver/src/constraint/match_all_constraint.rs14
-rw-r--r--crates/shirabe-semver/src/constraint/multi_constraint.rs1
3 files changed, 21 insertions, 1 deletions
diff --git a/crates/shirabe-semver/src/constraint/constraint.rs b/crates/shirabe-semver/src/constraint/constraint.rs
index 1435139..d64c0a0 100644
--- a/crates/shirabe-semver/src/constraint/constraint.rs
+++ b/crates/shirabe-semver/src/constraint/constraint.rs
@@ -388,3 +388,10 @@ impl ConstraintInterface for Constraint {
self
}
}
+
+impl std::fmt::Display for Constraint {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ use crate::constraint::constraint_interface::ConstraintInterface;
+ write!(f, "{}", ConstraintInterface::__to_string(self))
+ }
+}
diff --git a/crates/shirabe-semver/src/constraint/match_all_constraint.rs b/crates/shirabe-semver/src/constraint/match_all_constraint.rs
index 97ce98c..41aa32d 100644
--- a/crates/shirabe-semver/src/constraint/match_all_constraint.rs
+++ b/crates/shirabe-semver/src/constraint/match_all_constraint.rs
@@ -8,6 +8,20 @@ pub struct MatchAllConstraint {
pub(crate) pretty_string: Option<String>,
}
+impl MatchAllConstraint {
+ pub fn new() -> Self {
+ Self {
+ pretty_string: None,
+ }
+ }
+}
+
+impl Default for MatchAllConstraint {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
impl ConstraintInterface for MatchAllConstraint {
fn matches(&self, _provider: &dyn ConstraintInterface) -> bool {
true
diff --git a/crates/shirabe-semver/src/constraint/multi_constraint.rs b/crates/shirabe-semver/src/constraint/multi_constraint.rs
index 5596cc4..15397b6 100644
--- a/crates/shirabe-semver/src/constraint/multi_constraint.rs
+++ b/crates/shirabe-semver/src/constraint/multi_constraint.rs
@@ -2,7 +2,6 @@
use std::cell::RefCell;
-
use crate::constraint::bound::Bound;
use crate::constraint::constraint_interface::ConstraintInterface;
use crate::constraint::match_all_constraint::MatchAllConstraint;