From 1dd1458cc5227cab90bc964aba96011e15f443ea Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Mon, 13 May 2024 10:45:06 +0300 Subject: [PATCH] docs: point to gas! in Gas::record_cost --- crates/interpreter/src/gas.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/interpreter/src/gas.rs b/crates/interpreter/src/gas.rs index 192dcc7bc0..ac0af3079d 100644 --- a/crates/interpreter/src/gas.rs +++ b/crates/interpreter/src/gas.rs @@ -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;