nak: use saturating_sub() instead of open-coding it

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
This commit is contained in:
Eric Engestrom 2025-12-04 16:40:27 +01:00
parent f4c832ac15
commit 340c355714

View file

@ -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())
}
}