fix misuse of sled transactions
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Alex 2021-02-23 22:45:36 +01:00
parent 20e6e9fa20
commit a52ab69640
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ where
pub(crate) fn delete_if_equal(self: &Arc<Self>, k: &[u8], v: &[u8]) -> Result<bool, Error> {
let removed = self.store.transaction(|txn| {
if let Some(cur_v) = self.store.get(k)? {
if let Some(cur_v) = txn.get(k)? {
if cur_v == v {
txn.remove(v)?;
return Ok(true);