pub fn addOne(self: *Self, gpa: Allocator) Allocator.Error!usize
Extend the list by 1 element, returning the newly reserved index with uninitialized data.
Allocates more memory as necessary.
self: *Self
gpa: Allocator
303 304 305 306
pub fn addOne(self: *Self, gpa: Allocator) Allocator.Error!usize { try self.ensureUnusedCapacity(gpa, 1); return self.addOneAssumeCapacity(); }
Extend the list by 1 element, returning the newly reserved index with uninitialized data.
Allocates more memory as necessary.