aboutsummaryrefslogtreecommitdiff
path: root/src/model/bucket_table.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-11-20 23:20:20 +0100
committerAlex Auvolat <alex@adnab.me>2020-11-20 23:53:54 +0100
commit68be5072e5b6cdf0192a3fbc92713047ccf0d372 (patch)
treef7bf208240a2a8783e9cd3ec1ceefd77fa017aa1 /src/model/bucket_table.rs
parent173f0dbac98f7962c75663cf7ee37c700596b40d (diff)
downloadgarage-68be5072e5b6cdf0192a3fbc92713047ccf0d372.tar.gz
garage-68be5072e5b6cdf0192a3fbc92713047ccf0d372.zip
simplify
Diffstat (limited to 'src/model/bucket_table.rs')
-rw-r--r--src/model/bucket_table.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/model/bucket_table.rs b/src/model/bucket_table.rs
index 93421acb..b7f24d71 100644
--- a/src/model/bucket_table.rs
+++ b/src/model/bucket_table.rs
@@ -39,11 +39,10 @@ impl CRDT for BucketState {
impl Bucket {
pub fn new(name: String) -> Self {
- let ret = Bucket {
+ Bucket {
name,
state: crdt::LWW::new(BucketState::Present(crdt::LWWMap::new())),
- };
- ret
+ }
}
pub fn is_deleted(&self) -> bool {
*self.state.get() == BucketState::Deleted