diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-06 14:02:02 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-06 14:02:02 +0200 |
commit | a77efd7ca6a02b9c668607e67efcaeeafd36a8bd (patch) | |
tree | c6313bf6fdba527cddc8971d30917ceefda9d6d3 /src/model/index_counter.rs | |
parent | 7f2cf0b809f1fc5741990e2bfff94dc3ec41a04f (diff) | |
download | garage-a77efd7ca6a02b9c668607e67efcaeeafd36a8bd.tar.gz garage-a77efd7ca6a02b9c668607e67efcaeeafd36a8bd.zip |
Safe choice: revert "Update rmp-serde"
This reverts commit 16e0a655d0d01e3871aee81a0a9660102d6df74e.
Diffstat (limited to 'src/model/index_counter.rs')
-rw-r--r-- | src/model/index_counter.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/model/index_counter.rs b/src/model/index_counter.rs index d8c1229a..6f81be3e 100644 --- a/src/model/index_counter.rs +++ b/src/model/index_counter.rs @@ -181,9 +181,11 @@ impl<T: CounterSchema> IndexCounter<T> { let new_entry = self.local_counter.db().transaction(|mut tx| { let mut entry = match tx.get(&self.local_counter, &tree_key[..])? { - Some(old_bytes) => rmp_serde::decode::from_slice::<LocalCounterEntry>(&old_bytes) - .map_err(Error::RmpDecode) - .map_err(db::TxError::Abort)?, + Some(old_bytes) => { + rmp_serde::decode::from_read_ref::<_, LocalCounterEntry>(&old_bytes) + .map_err(Error::RmpDecode) + .map_err(db::TxError::Abort)? + } None => LocalCounterEntry { values: BTreeMap::new(), }, |