From 16ec9a68c94057ad5817676e77368d43fb46b51c Mon Sep 17 00:00:00 2001 From: Brooks Date: Fri, 28 Jul 2023 15:21:22 -0400 Subject: [PATCH] Unzips Option when deserializing snapshot data files (#32652) --- runtime/src/snapshot_utils.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index 0d366edee3836b..ec33283cff2f26 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -1036,18 +1036,14 @@ fn deserialize_snapshot_data_files_capped( if let Some(ref incremental_snapshot_root_file_path) = snapshot_root_paths.incremental_snapshot_root_file_path { - let (incremental_snapshot_file_size, incremental_snapshot_data_file_stream) = - create_snapshot_data_file_stream( - incremental_snapshot_root_file_path, - maximum_file_size, - )?; - ( - Some(incremental_snapshot_file_size), - Some(incremental_snapshot_data_file_stream), - ) + Some(create_snapshot_data_file_stream( + incremental_snapshot_root_file_path, + maximum_file_size, + )?) } else { - (None, None) - }; + None + } + .unzip(); let mut snapshot_streams = SnapshotStreams { full_snapshot_stream: &mut full_snapshot_data_file_stream,