diff options
Diffstat (limited to 'src/table/data.rs')
-rw-r--r-- | src/table/data.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/table/data.rs b/src/table/data.rs index 64ca9f14..f6d49b4d 100644 --- a/src/table/data.rs +++ b/src/table/data.rs @@ -243,10 +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 = match tx.get(&self.store, k)? { - Some(cur_v) if cur_v == v => true, - _ => false, - }; + let remove = matches!(tx.get(&self.store, k)?, Some(cur_v) if cur_v == v => true); if remove { tx.remove(&self.store, k)?; tx.insert(&self.merkle_todo, k, vec![])?; |