aboutsummaryrefslogtreecommitdiff
path: root/src/model/index_counter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/index_counter.rs')
-rw-r--r--src/model/index_counter.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/model/index_counter.rs b/src/model/index_counter.rs
index 33de797d..9e343e5f 100644
--- a/src/model/index_counter.rs
+++ b/src/model/index_counter.rs
@@ -181,11 +181,9 @@ impl<T: CounterSchema> IndexCounter<T> {
let new_entry = self.local_counter.db().transaction(|tx| {
let mut entry = match tx.get(&self.local_counter, &tree_key[..])? {
- Some(old_bytes) => {
- rmp_serde::decode::from_read_ref::<_, LocalCounterEntry>(&old_bytes)
- .map_err(Error::RmpDecode)
- .map_err(db::TxError::Abort)?
- }
+ Some(old_bytes) => rmp_serde::decode::from_slice::<LocalCounterEntry>(&old_bytes)
+ .map_err(Error::RmpDecode)
+ .map_err(db::TxError::Abort)?,
None => LocalCounterEntry {
values: BTreeMap::new(),
},