| ... | ... | @@ -501,8 +501,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 501 | 501 | /// Returns a slice of all the items plus the extra capacity, whose memory |
| 502 | 502 | /// contents are `undefined`. |
| 503 | 503 | pub fn allocatedSlice(self: Self) Slice { |
| 504 | | // For a nicer API, `items.len` is the length, not the capacity. |
| 505 | | // This requires "unsafe" slicing. |
| 504 | // `items.len` is the length, not the capacity. |
| 506 | 505 | return self.items.ptr[0..self.capacity]; |
| 507 | 506 | } |
| 508 | 507 | |
| ... | ... | @@ -1010,8 +1009,8 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ |
| 1010 | 1009 | return self.pop(); |
| 1011 | 1010 | } |
| 1012 | 1011 | |
| 1013 | | /// For a nicer API, `items.len` is the length, not the capacity. |
| 1014 | | /// This requires "unsafe" slicing. |
| 1012 | /// Returns a slice of all the items plus the extra capacity, whose memory |
| 1013 | /// contents are `undefined`. |
| 1015 | 1014 | pub fn allocatedSlice(self: Self) Slice { |
| 1016 | 1015 | return self.items.ptr[0..self.capacity]; |
| 1017 | 1016 | } |