Skip to content

Commit 013d2bb

Browse files
scottmcmgitbot
authored and
gitbot
committed
Go back to Some instead of transmuting to it.
This adds a few more statements to `next`, but optimizes better in the loops (saving 2 blocks in `forward_loop`, for example)
1 parent 46a1649 commit 013d2bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/slice/iter/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ macro_rules! iterator {
173173
}
174174
self.ptr = ptr.add(1);
175175
}
176-
crate::intrinsics::transmute::<NonNull<T>, Option<$elem>>(ptr)
176+
Some({ptr}.$into_ref())
177177
}
178178
}
179179

0 commit comments

Comments
 (0)