aboutsummaryrefslogtreecommitdiff
path: root/src/model/version_table.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-11-20 20:11:04 +0100
committerAlex Auvolat <alex@adnab.me>2020-11-20 20:11:04 +0100
commite9fd265ce6d326425994ccfea9d5afc7165460db (patch)
tree9dce56810d812d6b3293e20776b58bda91c05182 /src/model/version_table.rs
parentb9e6b007a317bf307b209cf01667fa207d62b67d (diff)
downloadgarage-e9fd265ce6d326425994ccfea9d5afc7165460db.tar.gz
garage-e9fd265ce6d326425994ccfea9d5afc7165460db.zip
Slight refactoring to make things clearer with DeletedFilter
Diffstat (limited to 'src/model/version_table.rs')
-rw-r--r--src/model/version_table.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model/version_table.rs b/src/model/version_table.rs
index 6054e389..0d831998 100644
--- a/src/model/version_table.rs
+++ b/src/model/version_table.rs
@@ -117,7 +117,7 @@ impl TableSchema for VersionTable {
type P = Hash;
type S = EmptyKey;
type E = Version;
- type Filter = ();
+ type Filter = DeletedFilter;
async fn updated(&self, old: Option<Self::E>, new: Option<Self::E>) -> Result<(), Error> {
let block_ref_table = self.block_ref_table.clone();
@@ -139,7 +139,7 @@ impl TableSchema for VersionTable {
Ok(())
}
- fn matches_filter(entry: &Self::E, _filter: &Self::Filter) -> bool {
- !entry.deleted
+ fn matches_filter(entry: &Self::E, filter: &Self::Filter) -> bool {
+ filter.apply(entry.deleted)
}
}