fix overflow

This commit is contained in:
nora 2025-03-23 11:43:04 +01:00
parent d369850db1
commit 16bd9072df

View file

@ -1459,7 +1459,7 @@ mod tests {
let start_time = std::time::Instant::now(); let start_time = std::time::Instant::now();
let insts = (start..=(start + CHUNK_SIZE)) let insts = (start..=start.saturating_add(CHUNK_SIZE))
.filter_map(|code| Some((code, Inst::decode_normal(code).ok()?))) .filter_map(|code| Some((code, Inst::decode_normal(code).ok()?)))
.filter(|(_, inst)| is_inst_supposed_to_roundtrip(inst)) .filter(|(_, inst)| is_inst_supposed_to_roundtrip(inst))
.collect::<Vec<_>>(); .collect::<Vec<_>>();