about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-08-19 13:23:00 +0400
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-08-21 01:32:40 +0400
commited084ba292609da9fe05808f186b72453013c094 (patch)
tree293ea3fe72467600f6585b78e8b2f09d26675c6d
parent6c943bad02626dddc5e5135b23c77429b6e4a063 (diff)
downloadrust-ed084ba292609da9fe05808f186b72453013c094.tar.gz
rust-ed084ba292609da9fe05808f186b72453013c094.zip
Remove useless pointer cast
-rw-r--r--library/alloc/src/vec/into_iter.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs
index 1b483e3fc77..606e3244626 100644
--- a/library/alloc/src/vec/into_iter.rs
+++ b/library/alloc/src/vec/into_iter.rs
@@ -148,7 +148,7 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> {
 
     #[inline]
     fn next(&mut self) -> Option<T> {
-        if self.ptr as *const _ == self.end {
+        if self.ptr == self.end {
             None
         } else if mem::size_of::<T>() == 0 {
             // purposefully don't use 'ptr.offset' because for