aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crdt/lww.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/crdt/lww.rs b/src/util/crdt/lww.rs
index adb07711..254abe8e 100644
--- a/src/util/crdt/lww.rs
+++ b/src/util/crdt/lww.rs
@@ -125,3 +125,15 @@ where
}
}
}
+
+impl<T> Default for Lww<T>
+where
+ T: Default,
+{
+ fn default() -> Self {
+ Self {
+ ts: 0,
+ v: T::default(),
+ }
+ }
+}