Propose ETag fix

This commit is contained in:
Alex Auvolat
2020-12-05 19:23:46 +01:00
parent dfbc280c37
commit 4a5bbbb810
5 changed files with 24 additions and 3 deletions
+2 -1
View File
@@ -391,7 +391,8 @@ where
let (old_entry, new_entry) = self.store.transaction(|db| {
let (old_entry, new_entry) = match db.get(&tree_key)? {
Some(prev_bytes) => {
let old_entry = self.decode_entry(&prev_bytes)
let old_entry = self
.decode_entry(&prev_bytes)
.map_err(sled::ConflictableTransactionError::Abort)?;
let mut new_entry = old_entry.clone();
new_entry.merge(&update);