diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-04-07 13:39:34 +0200 |
---|---|---|
committer | Trinity Pointard <trinity.pointard@gmail.com> | 2021-04-07 13:39:34 +0200 |
commit | 718ae005486baeed358d56cc7cd319fedd1e76eb (patch) | |
tree | ba5e6e91380236e21f697381277817049d6e6d58 /src/model/bucket_table.rs | |
parent | c8906f200bf907272bf9fba7d183df4332fa085b (diff) | |
download | garage-718ae005486baeed358d56cc7cd319fedd1e76eb.tar.gz garage-718ae005486baeed358d56cc7cd319fedd1e76eb.zip |
change some more comments and revert changes on TableSchema
Diffstat (limited to 'src/model/bucket_table.rs')
-rw-r--r-- | src/model/bucket_table.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/model/bucket_table.rs b/src/model/bucket_table.rs index 8198deb7..6a4b021d 100644 --- a/src/model/bucket_table.rs +++ b/src/model/bucket_table.rs @@ -57,7 +57,7 @@ impl CRDT for BucketParams { } impl BucketParams { - /// Create a new default `BucketParams` + /// Initializes a new instance of the Bucket struct pub fn new() -> Self { BucketParams { authorized_keys: crdt::LWWMap::new(), @@ -75,7 +75,7 @@ impl Bucket { } } - /// Query if bucket is deleted + /// Returns true if this represents a deleted bucket pub fn is_deleted(&self) -> bool { *self.state.get() == BucketState::Deleted } @@ -113,10 +113,6 @@ impl TableSchema for BucketTable { type E = Bucket; type Filter = DeletedFilter; - fn updated(&self, _old: Option<Self::E>, _new: Option<Self::E>) { - // nothing to do when updated - } - fn matches_filter(entry: &Self::E, filter: &Self::Filter) -> bool { filter.apply(entry.is_deleted()) } |