Skip to content

Commit bece0af

Browse files
committed
Remove useless pointer cast
1 parent 60327d1 commit bece0af

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
@@ -147,7 +147,7 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> {
147147

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

0 commit comments

Comments
 (0)