aboutsummaryrefslogtreecommitdiff
path: root/src/model/migrate.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-01-03 15:27:36 +0100
committerAlex Auvolat <alex@adnab.me>2023-01-03 15:27:36 +0100
commit8d5505514f950dc1ca1249a3385c9913b5b5e8e0 (patch)
treea74c043fe76deab6cb0919c6f002f0a4e87be19d /src/model/migrate.rs
parent426d8784dac0e39879af52d980887d3692fc907c (diff)
downloadgarage-8d5505514f950dc1ca1249a3385c9913b5b5e8e0.tar.gz
garage-8d5505514f950dc1ca1249a3385c9913b5b5e8e0.zip
Make it explicit when using nonversioned encoding
Diffstat (limited to 'src/model/migrate.rs')
-rw-r--r--src/model/migrate.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/model/migrate.rs b/src/model/migrate.rs
index cd6ad26a..6b4c3eed 100644
--- a/src/model/migrate.rs
+++ b/src/model/migrate.rs
@@ -2,6 +2,7 @@ use std::sync::Arc;
use garage_util::crdt::*;
use garage_util::data::*;
+use garage_util::encode::nonversioned_decode;
use garage_util::error::Error as GarageError;
use garage_util::time::*;
@@ -28,8 +29,8 @@ impl Migrate {
let mut old_buckets = vec![];
for res in tree.iter().map_err(GarageError::from)? {
let (_k, v) = res.map_err(GarageError::from)?;
- let bucket = rmp_serde::decode::from_read_ref::<_, old_bucket::Bucket>(&v[..])
- .map_err(GarageError::from)?;
+ let bucket =
+ nonversioned_decode::<old_bucket::Bucket>(&v[..]).map_err(GarageError::from)?;
old_buckets.push(bucket);
}