aboutsummaryrefslogtreecommitdiff
path: root/src/util/crdt/lww.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/crdt/lww.rs')
-rw-r--r--src/util/crdt/lww.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/crdt/lww.rs b/src/util/crdt/lww.rs
index 43d13f27..bc686e05 100644
--- a/src/util/crdt/lww.rs
+++ b/src/util/crdt/lww.rs
@@ -82,6 +82,11 @@ where
&self.v
}
+ /// Take the value inside the CRDT (discards the timesamp)
+ pub fn take(self) -> T {
+ self.v
+ }
+
/// Get a mutable reference to the CRDT's value
///
/// This is usefull to mutate the inside value without changing the LWW timestamp.