Skip to content

Commit

Permalink
refactor: unwrap -> expect in native gas withdraw
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-pino committed Oct 7, 2024
1 parent 425acc7 commit e6d93b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/blockifier/src/execution/native/syscall_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e6d93b1

Please sign in to comment.