diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 04:56:37 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 04:57:23 +0900 |
| commit | 8fb6de392bbac104c07a5cdbac12a4fd25ab1127 (patch) | |
| tree | 9cbe66e913ae2166b1f976ae5a2a1e8a06492e97 /crates/shirabe-semver/src/interval.rs | |
| parent | 90b3be462bd2f91ef366df06c2b5bbae2821a394 (diff) | |
| download | php-shirabe-8fb6de392bbac104c07a5cdbac12a4fd25ab1127.tar.gz php-shirabe-8fb6de392bbac104c07a5cdbac12a4fd25ab1127.tar.zst php-shirabe-8fb6de392bbac104c07a5cdbac12a4fd25ab1127.zip | |
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
Diffstat (limited to 'crates/shirabe-semver/src/interval.rs')
| -rw-r--r-- | crates/shirabe-semver/src/interval.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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<Constraint> = 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<Constraint> = 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 { |
