From e6d93b1433f348cf417e899ffdea0f8639cfa9d6 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 7 Oct 2024 07:18:41 -0400 Subject: [PATCH] refactor: unwrap -> expect in native gas withdraw --- crates/blockifier/src/execution/native/syscall_handler.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/blockifier/src/execution/native/syscall_handler.rs b/crates/blockifier/src/execution/native/syscall_handler.rs index 7f9ca94be6..806abbc7b1 100644 --- a/crates/blockifier/src/execution/native/syscall_handler.rs +++ b/crates/blockifier/src/execution/native/syscall_handler.rs @@ -317,7 +317,8 @@ impl<'state> StarknetSyscallHandler for &mut NativeSyscallHandler<'state> { #[allow(dead_code)] fn native_update_remaining_gas(remaining_gas: &mut u128, call_info: &CallInfo) { // Create a new variable with converted type. - let mut remaining_gas_u64 = u64::try_from(*remaining_gas).unwrap(); + let mut remaining_gas_u64 = + u64::try_from(*remaining_gas).expect("Failed to convert gas to u64."); // Pass the reference to the function. update_remaining_gas(&mut remaining_gas_u64, call_info);