aboutsummaryrefslogtreecommitdiff
path: root/src/table/gc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/table/gc.rs')
-rw-r--r--src/table/gc.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/table/gc.rs b/src/table/gc.rs
index 04872a38..260fecfa 100644
--- a/src/table/gc.rs
+++ b/src/table/gc.rs
@@ -378,8 +378,11 @@ impl GcTodoEntry {
let key = self.todo_table_key();
gc_todo_tree.db().transaction(|tx| {
let old_val = tx.get(gc_todo_tree, &key)?;
- if old_val == Some(self.value_hash.as_slice().into()) {
- tx.remove(gc_todo_tree, &key)?;
+ match old_val {
+ Some(ov) if ov == self.value_hash.as_slice() => {
+ tx.remove(gc_todo_tree, &key)?;
+ }
+ _ => (),
}
tx.commit(())
})?;