Skip to content

Commit

Permalink
Small fix. (#4114)
Browse files Browse the repository at this point in the history
  • Loading branch information
liorgold2 authored Sep 21, 2023
1 parent befcb3f commit 45aa262
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/cairo-lang-sierra-gas/src/compute_costs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ impl<'a, CostType: CostTypeTrait> CostContext<'a, CostType> {
/// For `branch_align` the function returns the result as if the alignment is zero (since the
/// alignment is not know at this point).
fn wallet_at(&self, idx: &StatementIdx) -> WalletInfo<CostType> {
self.costs.get(idx).expect("Wallet value for statement {idx} was not yet computed.").clone()
self.costs
.get(idx)
.unwrap_or_else(|| panic!("Wallet value for statement {idx} was not yet computed."))
.clone()
}

/// Prepares the values for [Self::wallet_at].
Expand Down

0 comments on commit 45aa262

Please sign in to comment.