Skip to content

Commit

Permalink
docs: point to gas! in Gas::record_cost (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored May 13, 2024
1 parent 29b2224 commit 287ae36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/interpreter/src/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl Gas {
///
/// Returns `false` if the gas limit is exceeded.
#[inline]
#[must_use]
#[must_use = "prefer using `gas!` instead to return an out-of-gas error on failure"]
pub fn record_cost(&mut self, cost: u64) -> bool {
let (remaining, overflow) = self.remaining.overflowing_sub(cost);
let success = !overflow;
Expand Down

0 comments on commit 287ae36

Please sign in to comment.