diff --git a/src/nouveau/nil/copy.rs b/src/nouveau/nil/copy.rs index f4f706138de..6d93e34198b 100644 --- a/src/nouveau/nil/copy.rs +++ b/src/nouveau/nil/copy.rs @@ -321,11 +321,7 @@ fn chunk_range( chunk_len: u32, ) -> Range { debug_assert!(chunk_start < whole.end); - let start = if chunk_start < whole.start { - whole.start - chunk_start - } else { - 0 - }; + let start = whole.start.saturating_sub(chunk_start); let end = std::cmp::min(whole.end - chunk_start, chunk_len); start..end }