Make Range implementation safe

This commit is contained in:
Jacob Pratt 2021-04-01 05:06:28 -04:00
parent 641c8cd875
commit a875876027
No known key found for this signature in database
GPG key ID: B80E19E4662B5AA4
3 changed files with 24 additions and 31 deletions

View file

@ -184,7 +184,7 @@ macro_rules! newtype_index {
}
}
unsafe impl ::std::iter::Step for $type {
impl ::std::iter::Step for $type {
#[inline]
fn steps_between(start: &Self, end: &Self) -> Option<usize> {
<usize as ::std::iter::Step>::steps_between(