Skip to content

Commit ed084ba

Browse files
committed
Remove useless pointer cast
1 parent 6c943ba commit ed084ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/vec/into_iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> {
148148

149149
#[inline]
150150
fn next(&mut self) -> Option<T> {
151-
if self.ptr as *const _ == self.end {
151+
if self.ptr == self.end {
152152
None
153153
} else if mem::size_of::<T>() == 0 {
154154
// purposefully don't use 'ptr.offset' because for

0 commit comments

Comments
 (0)