New buckets for 0.6.0: fix model and migration

This commit is contained in:
Alex Auvolat
2021-12-22 18:50:08 +01:00
parent c7d5c73244
commit d8ab5bdc3e
15 changed files with 174 additions and 96 deletions
+2 -5
View File
@@ -259,11 +259,8 @@ impl TableSchema for ObjectTable {
}
fn try_migrate(bytes: &[u8]) -> Option<Self::E> {
let old_v = match rmp_serde::decode::from_read_ref::<_, old::Object>(bytes) {
Ok(x) => x,
Err(_) => return None,
};
Some(migrate_object(old_v))
let old_obj = rmp_serde::decode::from_read_ref::<_, old::Object>(bytes).ok()?;
Some(migrate_object(old_obj))
}
}