Remove useless pointer cast

This commit is contained in:
Maybe Waffle 2022-08-19 13:23:00 +04:00
parent 6c943bad02
commit ed084ba292

View File

@ -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