pub fn append(self: *Self, item: T) Allocator.Error!void
Extends the list by 1 element. Allocates more memory as necessary. Invalidates element pointers if additional memory is needed.
self: *Self
item: T
289 290 291 292
pub fn append(self: *Self, item: T) Allocator.Error!void { const new_item_ptr = try self.addOne(); new_item_ptr.* = item; }
Extends the list by 1 element. Allocates more memory as necessary. Invalidates element pointers if additional memory is needed.