diff options
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/data.rs | 2 | ||||
-rw-r--r-- | src/table/gc.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/table/data.rs b/src/table/data.rs index f6d49b4d..6352ac24 100644 --- a/src/table/data.rs +++ b/src/table/data.rs @@ -243,7 +243,7 @@ where pub(crate) fn delete_if_equal(self: &Arc<Self>, k: &[u8], v: &[u8]) -> Result<bool, Error> { let removed = self.store.db().transaction(|mut tx| { - let remove = matches!(tx.get(&self.store, k)?, Some(cur_v) if cur_v == v => true); + let remove = matches!(tx.get(&self.store, k)?, Some(cur_v) if cur_v == v); if remove { tx.remove(&self.store, k)?; tx.insert(&self.merkle_todo, k, vec![])?; diff --git a/src/table/gc.rs b/src/table/gc.rs index b9c589f4..e8843339 100644 --- a/src/table/gc.rs +++ b/src/table/gc.rs @@ -384,7 +384,7 @@ impl GcTodoEntry { let key = self.todo_table_key(); gc_todo_tree.db().transaction(|mut tx| { let remove = - matches!(tx.get(gc_todo_tree, &key)? Some(ov) if ov == self.value_hash.as_slice()); + matches!(tx.get(gc_todo_tree, &key)?, Some(ov) if ov == self.value_hash.as_slice()); if remove { tx.remove(gc_todo_tree, &key)?; } |