Skip to content

Commit

Permalink
Remove useless pointer cast
Browse files Browse the repository at this point in the history
  • Loading branch information
WaffleLapkin committed Aug 20, 2022
1 parent 6c943ba commit ed084ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/vec/into_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed084ba

Please sign in to comment.