From 8fb6de392bbac104c07a5cdbac12a4fd25ab1127 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 17 May 2026 04:56:37 +0900 Subject: fix(semver): resolve shirabe-semver compile errors - Replace RefCell with Mutex in Constraint for thread safety - Add clone_box() to ConstraintInterface for cloning trait objects - Propagate Result from Constraint::new() and unwrap at call sites - Fix VersionParser instantiation (unit struct, not fn) - Add indexmap dependency to shirabe-semver --- crates/shirabe-semver/src/interval.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/shirabe-semver/src/interval.rs') diff --git a/crates/shirabe-semver/src/interval.rs b/crates/shirabe-semver/src/interval.rs index 237ad0b..cf4f481 100644 --- a/crates/shirabe-semver/src/interval.rs +++ b/crates/shirabe-semver/src/interval.rs @@ -31,13 +31,14 @@ impl Interval { pub fn from_zero() -> &'static Constraint { static ZERO: OnceLock = OnceLock::new(); - ZERO.get_or_init(|| Constraint::new(">=".to_string(), "0.0.0.0-dev".to_string())) + ZERO.get_or_init(|| Constraint::new(">=".to_string(), "0.0.0.0-dev".to_string()).unwrap()) } pub fn until_positive_infinity() -> &'static Constraint { static POSITIVE_INFINITY: OnceLock = OnceLock::new(); - POSITIVE_INFINITY - .get_or_init(|| Constraint::new("<".to_string(), format!("{}.0.0.0", i64::MAX))) + POSITIVE_INFINITY.get_or_init(|| { + Constraint::new("<".to_string(), format!("{}.0.0.0", i64::MAX)).unwrap() + }) } pub fn any() -> Self { -- cgit v1.3.1