aboutsummaryrefslogtreecommitdiff
path: root/src/table/crdt/lww.rs
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-05-02 23:13:08 +0200
committerAlex Auvolat <alex@adnab.me>2021-05-03 22:15:09 +0200
commite4b9e4e24d006373a20cfcbdac9dba5e399ee182 (patch)
tree620e24d182e6db4ad7ddca274eb8071d8241a1d6 /src/table/crdt/lww.rs
parent6644df6b969df3f7ff0516ab7acd9b600dff0a54 (diff)
downloadgarage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.tar.gz
garage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.zip
rename types to CamelCase
Diffstat (limited to 'src/table/crdt/lww.rs')
-rw-r--r--src/table/crdt/lww.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/table/crdt/lww.rs b/src/table/crdt/lww.rs
index 3b1b2406..be197d88 100644
--- a/src/table/crdt/lww.rs
+++ b/src/table/crdt/lww.rs
@@ -36,14 +36,14 @@ use crate::crdt::crdt::*;
/// This scheme is used by AWS S3 or Soundcloud and often without knowing
/// in enterprise when reconciliating databases with ad-hoc scripts.
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
-pub struct LWW<T> {
+pub struct Lww<T> {
ts: u64,
v: T,
}
-impl<T> LWW<T>
+impl<T> Lww<T>
where
- T: CRDT,
+ T: Crdt,
{
/// Creates a new CRDT
///
@@ -99,9 +99,9 @@ where
}
}
-impl<T> CRDT for LWW<T>
+impl<T> Crdt for Lww<T>
where
- T: Clone + CRDT,
+ T: Clone + Crdt,
{
fn merge(&mut self, other: &Self) {
if other.ts > self.ts {