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/model/key_table.rs | |
parent | 6644df6b969df3f7ff0516ab7acd9b600dff0a54 (diff) | |
download | garage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.tar.gz garage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.zip |
rename types to CamelCase
Diffstat (limited to 'src/model/key_table.rs')
-rw-r--r-- | src/model/key_table.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/model/key_table.rs b/src/model/key_table.rs index ba1f6b81..a6186aa9 100644 --- a/src/model/key_table.rs +++ b/src/model/key_table.rs @@ -13,14 +13,14 @@ pub struct Key { pub secret_key: String, /// Name for the key - pub name: crdt::LWW<String>, + pub name: crdt::Lww<String>, /// Is the key deleted pub deleted: crdt::Bool, /// Buckets in which the key is authorized. Empty if `Key` is deleted // CRDT interaction: deleted implies authorized_buckets is empty - pub authorized_buckets: crdt::LWWMap<String, PermissionSet>, + pub authorized_buckets: crdt::LwwMap<String, PermissionSet>, } impl Key { @@ -31,9 +31,9 @@ impl Key { Self { key_id, secret_key, - name: crdt::LWW::new(name), + name: crdt::Lww::new(name), deleted: crdt::Bool::new(false), - authorized_buckets: crdt::LWWMap::new(), + authorized_buckets: crdt::LwwMap::new(), } } @@ -42,9 +42,9 @@ impl Key { Self { key_id: key_id.to_string(), secret_key: secret_key.to_string(), - name: crdt::LWW::new(name.to_string()), + name: crdt::Lww::new(name.to_string()), deleted: crdt::Bool::new(false), - authorized_buckets: crdt::LWWMap::new(), + authorized_buckets: crdt::LwwMap::new(), } } @@ -53,9 +53,9 @@ impl Key { Self { key_id, secret_key: "".into(), - name: crdt::LWW::new("".to_string()), + name: crdt::Lww::new("".to_string()), deleted: crdt::Bool::new(true), - authorized_buckets: crdt::LWWMap::new(), + authorized_buckets: crdt::LwwMap::new(), } } @@ -85,7 +85,7 @@ pub struct PermissionSet { pub allow_write: bool, } -impl AutoCRDT for PermissionSet { +impl AutoCrdt for PermissionSet { const WARN_IF_DIFFERENT: bool = true; } @@ -98,7 +98,7 @@ impl Entry<EmptyKey, String> for Key { } } -impl CRDT for Key { +impl Crdt for Key { fn merge(&mut self, other: &Self) { self.name.merge(&other.name); self.deleted.merge(&other.deleted); |