From 13bac047f35bcf46a8d5e645ad33188b79278cf9 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sat, 31 Oct 2026 18:56:43 +0700 Subject: [PATCH] EPS import: spend keeps its own doc comment --- crates/eps/src/import/interp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/eps/src/import/interp.rs b/crates/eps/src/import/interp.rs index 68053f29b..12232624f 100644 --- a/crates/eps/src/import/interp.rs +++ b/crates/eps/src/import/interp.rs @@ -333,14 +333,14 @@ impl<'a> Interp<'a> { self.spend(1) } - /// Count `ops` operations' worth of work against [`MAX_OPS`]: what an operator that costs - /// far more than one operation (laying out type) does in a loop has to end too. /// Charge for work on `n` bytes or objects in one operator: one operation per 256, as `search` /// charges per 64 bytes, so a loop of big copies runs out of the budget. fn spend_bytes(&mut self, n: usize) -> Res { self.spend((n / 256) as u64) } + /// Count `ops` operations' worth of work against [`MAX_OPS`]: what an operator that costs + /// far more than one operation (laying out type) does in a loop has to end too. pub fn spend(&mut self, ops: u64) -> Res { self.ops = self.ops.saturating_add(ops); if self.ops > MAX_OPS {