Skip to content

Commit 3f83960

Browse files
committed
Merge branch 'develop'
2 parents 71c11dd + 2433eef commit 3f83960

File tree

21 files changed

+304
-1156
lines changed

21 files changed

+304
-1156
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ smallvec = { version = "1.13", features = ["serde"] }
7474
thiserror = "2.0.17"
7575
serde = { version = "1.0.228", features = ["derive", "rc"] }
7676
serde_json = { version = "1.0.149" }
77-
chrono = { version = "0.4.42", default-features = false, features = ["std"] }
77+
chrono = { version = "0.4.43", default-features = false, features = ["std"] }
7878
chrono-tz = "0.10"
7979
compact_str = { version = "0.9.0" }
8080
regex = "1.12.2"

crates/radiate-core/src/domain/sync/cell.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ impl<T> MutCell<T> {
8585

8686
impl<T> Clone for MutCell<T> {
8787
fn clone(&self) -> Self {
88+
// SAFETY: We are only incrementing the ref_count here - no mutable access is done.
8889
unsafe {
8990
(*self.inner).ref_count.fetch_add(1, Ordering::Relaxed);
9091
}
@@ -101,6 +102,8 @@ impl<T> Drop for MutCell<T> {
101102
return;
102103
}
103104

105+
// SAFETY: We are decrementing the ref_count here - no mutable access is done.
106+
// If the ref_count reaches zero, we can safely drop the inner value.
104107
unsafe {
105108
if (*self.inner).ref_count.fetch_sub(1, Ordering::Release) == 1 {
106109
std::sync::atomic::fence(Ordering::Acquire);

0 commit comments

Comments
 (0)