Make Range implementation safe
This commit is contained in:
parent
641c8cd875
commit
a875876027
3 changed files with 24 additions and 31 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue