浏览代码

Handle the case where the migration table has illegal entries for some reason

Ian Goldberg 3 年之前
父节点
当前提交
d086302257
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/migration_table.rs

+ 1 - 2
src/migration_table.rs

@@ -156,7 +156,7 @@ impl MigrationTable {
     ) -> HashMap<[u8; 16], [u8; ENC_MIGRATION_BYTES]> {
         self.table
             .iter()
-            .map(|(from_id, to_id)| {
+            .filter_map(|(from_id, to_id)| {
                 encrypt_cred_ids(
                     id,
                     *from_id,
@@ -166,7 +166,6 @@ impl MigrationTable {
                     migration_priv,
                     migrationkey_priv,
                 )
-                .unwrap()
             })
             .collect()
     }