From 340c355714f4c2f96f00c37a3df0d0f953157bca Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 4 Dec 2025 16:40:27 +0100 Subject: [PATCH] nak: use saturating_sub() instead of open-coding it Part-of: --- src/nouveau/compiler/nak/calc_instr_deps.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nouveau/compiler/nak/calc_instr_deps.rs b/src/nouveau/compiler/nak/calc_instr_deps.rs index 570c34e66ef..967b70cef07 100644 --- a/src/nouveau/compiler/nak/calc_instr_deps.rs +++ b/src/nouveau/compiler/nak/calc_instr_deps.rs @@ -801,7 +801,7 @@ impl BlockDelayScheduler<'_> { // current block is complete, so it is effectively executed at cycle // `0 - delay`, adding the latency we get `latency - delay` // Underflow means that the instruction is already done (delay > latency). - latency.checked_sub(delay.into()).unwrap_or(0) + latency.saturating_sub(delay.into()) } }