diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-05-02 23:13:08 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-05-03 22:15:09 +0200 |
commit | e4b9e4e24d006373a20cfcbdac9dba5e399ee182 (patch) | |
tree | 620e24d182e6db4ad7ddca274eb8071d8241a1d6 /src/table/crdt/lww_map.rs | |
parent | 6644df6b969df3f7ff0516ab7acd9b600dff0a54 (diff) | |
download | garage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.tar.gz garage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.zip |
rename types to CamelCase
Diffstat (limited to 'src/table/crdt/lww_map.rs')
-rw-r--r-- | src/table/crdt/lww_map.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/table/crdt/lww_map.rs b/src/table/crdt/lww_map.rs index 4ed26809..36bbf667 100644 --- a/src/table/crdt/lww_map.rs +++ b/src/table/crdt/lww_map.rs @@ -22,14 +22,14 @@ use crate::crdt::crdt::*; /// the serialization cost `O(n)` would still have to be paid at each modification, so we are /// actually not losing anything here. #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] -pub struct LWWMap<K, V> { +pub struct LwwMap<K, V> { vals: Vec<(K, u64, V)>, } -impl<K, V> LWWMap<K, V> +impl<K, V> LwwMap<K, V> where K: Ord, - V: CRDT, + V: Crdt, { /// Create a new empty map CRDT pub fn new() -> Self { @@ -125,10 +125,10 @@ where } } -impl<K, V> CRDT for LWWMap<K, V> +impl<K, V> Crdt for LwwMap<K, V> where K: Clone + Ord, - V: Clone + CRDT, + V: Clone + Crdt, { fn merge(&mut self, other: &Self) { for (k, ts2, v2) in other.vals.iter() { @@ -150,10 +150,10 @@ where } } -impl<K, V> Default for LWWMap<K, V> +impl<K, V> Default for LwwMap<K, V> where K: Ord, - V: CRDT, + V: Crdt, { fn default() -> Self { Self::new() |