Skip to content

Commit 5eeb6c4

Browse files
committed
fix one more unaligned self.ptr, and add tests
1 parent fd8bd1c commit 5eeb6c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

alloc/src/vec/into_iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> {
251251
return Err(unsafe { array::IntoIter::new_unchecked(raw_ary, 0..len) });
252252
}
253253

254-
self.ptr = self.ptr.wrapping_byte_add(N);
254+
self.end = self.end.wrapping_byte_sub(N);
255255
// Safety: ditto
256256
return Ok(unsafe { raw_ary.transpose().assume_init() });
257257
}

0 commit comments

Comments
 (0)