Commits
Click on a commit to change the comparison rangefix(syntax): fix unsound use of `NonZeroU32` (#4466)
`NonZeroU32::new_unchecked(idx as u32 + 1)` is unsound because if `idx == u32::MAX`, `idx + 1` wraps around back to zero. So unfortunately we need to use the checked version `NonZeroU32::new(idx as u32 + 1).unwrap()` to avoid UB in this edge case.1 year ago
by overlookmotel