From ab864fae45e21cae497133507fbbd90438958cf1 Mon Sep 17 00:00:00 2001 From: Ian Goldberg Date: Sat, 1 May 2021 11:56:25 -0400 Subject: [PATCH] Handle the case where the migration table has illegal entries for some reason --- crates/lox-library/src/migration_table.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/lox-library/src/migration_table.rs b/crates/lox-library/src/migration_table.rs index 081da54..7973d7a 100644 --- a/crates/lox-library/src/migration_table.rs +++ b/crates/lox-library/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() }