From e9fd265ce6d326425994ccfea9d5afc7165460db Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 20 Nov 2020 20:11:04 +0100 Subject: Slight refactoring to make things clearer with DeletedFilter --- src/model/block_ref_table.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/model/block_ref_table.rs') diff --git a/src/model/block_ref_table.rs b/src/model/block_ref_table.rs index a00438c0..5a7d9aa1 100644 --- a/src/model/block_ref_table.rs +++ b/src/model/block_ref_table.rs @@ -47,7 +47,7 @@ impl TableSchema for BlockRefTable { type P = Hash; type S = UUID; type E = BlockRef; - type Filter = (); + type Filter = DeletedFilter; async fn updated(&self, old: Option, new: Option) -> Result<(), Error> { let block = &old.as_ref().or(new.as_ref()).unwrap().block; @@ -62,7 +62,7 @@ impl TableSchema for BlockRefTable { 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) } } -- cgit v1.2.3