pub fn append(self: *Self, gpa: Allocator, item: T) Allocator.Error!void
Extend the list by 1 element. Allocates more memory as necessary. Invalidates element pointers if additional memory is needed.
self: *Self
gpa: Allocator
item: T
1023 1024 1025 1026
pub fn append(self: *Self, gpa: Allocator, item: T) Allocator.Error!void { const new_item_ptr = try self.addOne(gpa); new_item_ptr.* = item; }
Extend the list by 1 element. Allocates more memory as necessary. Invalidates element pointers if additional memory is needed.