mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-24 17:11:01 +00:00
factorize
This commit is contained in:
parent
e6f14ab5cf
commit
13c8662126
1 changed files with 4 additions and 5 deletions
|
@ -330,13 +330,12 @@ where
|
|||
let mut entry = self.decode_entry(&old_v).map_err(db::TxError::Abort)?;
|
||||
entry.merge(ins);
|
||||
rmp_to_vec_all_named(&entry)
|
||||
.map_err(Error::RmpEncode)
|
||||
.map_err(db::TxError::Abort)?
|
||||
}
|
||||
None => rmp_to_vec_all_named(ins)
|
||||
.map_err(Error::RmpEncode)
|
||||
.map_err(db::TxError::Abort)?,
|
||||
None => rmp_to_vec_all_named(ins),
|
||||
};
|
||||
let new_entry = new_entry
|
||||
.map_err(Error::RmpEncode)
|
||||
.map_err(db::TxError::Abort)?;
|
||||
tx.insert(&self.insert_queue, &tree_key, new_entry)?;
|
||||
self.insert_queue_notify.notify_one();
|
||||
|
||||
|
|
Loading…
Reference in a new issue