From 5c768efb437a99403480fe3a68a49f9807fcb0c1 Mon Sep 17 00:00:00 2001 From: Xiang Zhu Date: Tue, 3 Jan 2023 06:24:46 -0800 Subject: [PATCH] Update runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs Co-authored-by: apfitzge --- runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs b/runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs index 568f871798bf02..3d87b56d51d402 100644 --- a/runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs +++ b/runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs @@ -391,10 +391,10 @@ pub(crate) fn get_slot_and_append_vec_id(filename: &str) -> (Slot, usize) { STORAGE_FILE_REGEX .captures(filename) .map(|cap| { - let slot_str = cap.name("slot").map(|m| m.as_str()); - let id_str = cap.name("id").map(|m| m.as_str()); - let slot: Slot = slot_str.unwrap().parse::().unwrap(); - let id = id_str.unwrap().parse::().unwrap() as usize; + let slot_str = cap.name("slot").map(|m| m.as_str()).unwrap(); + let id_str = cap.name("id").map(|m| m.as_str()).unwrap(); + let slot = slot_str.parse().unwrap(); + let id = id_str.parse().unwrap(); (slot, id) }) .unwrap()