| author | |
| committer | |
| log | fb2f0cc497c0af897a3d2dd3f612e50522368221 |
| tree | e8458f50e9d6c5ee97d18192df8749a930cece2c |
| parent | 54231e832bae780c5012fc5cd30932447f1e1d47 |
1 files changed, 5 insertions(+), 0 deletions(-)
lib/std/array_list.zig+5| ... | ... | @@ -71,6 +71,11 @@ pub fn AlignedArrayList(comptime T: type, comptime alignment: ?u29) type { |
| 71 | 71 | return self.toSliceConst()[i]; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | /// Safely access ptr to index i of the list. | |
| 75 | pub fn ptrAt(self: Self, i: usize) *T { | |
| 76 | return &self.toSlice()[i]; | |
| 77 | } | |
| 78 | ||
| 74 | 79 | /// Sets the value at index `i`, or returns `error.OutOfBounds` if |
| 75 | 80 | /// the index is not in range. |
| 76 | 81 | pub fn setOrError(self: Self, i: usize, item: T) !void { |