| ... | @@ -267,8 +267,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { | ... | @@ -267,8 +267,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 267 | /// Never invalidates element pointers. | 267 | /// Never invalidates element pointers. |
| 268 | /// Asserts that the list can hold one additional item. | 268 | /// Asserts that the list can hold one additional item. |
| 269 | pub fn appendAssumeCapacity(self: *Self, item: T) void { | 269 | pub fn appendAssumeCapacity(self: *Self, item: T) void { |
| 270 | const new_item_ptr = self.addOneAssumeCapacity(); | 270 | self.addOneAssumeCapacity().* = item; |
| 271 | new_item_ptr.* = item; | | |
| 272 | } | 271 | } |
| 273 | | 272 | |
| 274 | /// Remove the element at index `i`, shift elements after index | 273 | /// Remove the element at index `i`, shift elements after index |
| ... | @@ -879,8 +878,7 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ | ... | @@ -879,8 +878,7 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ |
| 879 | /// Never invalidates element pointers. | 878 | /// Never invalidates element pointers. |
| 880 | /// Asserts that the list can hold one additional item. | 879 | /// Asserts that the list can hold one additional item. |
| 881 | pub fn appendAssumeCapacity(self: *Self, item: T) void { | 880 | pub fn appendAssumeCapacity(self: *Self, item: T) void { |
| 882 | const new_item_ptr = self.addOneAssumeCapacity(); | 881 | self.addOneAssumeCapacity().* = item; |
| 883 | new_item_ptr.* = item; | | |
| 884 | } | 882 | } |
| 885 | | 883 | |
| 886 | /// Remove the element at index `i` from the list and return its value. | 884 | /// Remove the element at index `i` from the list and return its value. |