From af53d2f69233d95207c8b8ed511df37c72d289c3 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Fri, 17 Dec 2021 09:06:23 -0600 Subject: [PATCH] simplify api on reconstruct_single_storage (#21970) --- runtime/src/serde_snapshot.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/runtime/src/serde_snapshot.rs b/runtime/src/serde_snapshot.rs index e5423c07a9..5f427cd436 100644 --- a/runtime/src/serde_snapshot.rs +++ b/runtime/src/serde_snapshot.rs @@ -371,13 +371,12 @@ fn reconstruct_single_storage( slot: &Slot, append_vec_path: &Path, storage_entry: &E, - remapped_append_vec_id: Option, + append_vec_id: AppendVecId, new_slot_storage: &mut HashMap>, ) -> Result<(), Error> where E: SerializableStorage, { - let append_vec_id = remapped_append_vec_id.unwrap_or_else(|| storage_entry.id()); let (accounts, num_accounts) = AppendVec::new_from_file(append_vec_path, storage_entry.current_len())?; let u_storage_entry = @@ -488,7 +487,7 @@ where slot, &remapped_append_vec_path, storage_entry, - Some(remapped_append_vec_id), + remapped_append_vec_id, &mut new_slot_storage, )?; }