pub fn ensureTotalCapacity(self: *Self, gpa: Allocator, new_capacity: usize) Oom!void 411
412
413
414
415 pub fn ensureTotalCapacity(self: *Self, gpa: Allocator, new_capacity: usize) Oom!void {
if (@sizeOf(ByIndexContext) != 0)
@compileError("Cannot infer context " ++ @typeName(Context) ++ ", call ensureTotalCapacityContext instead.");
return self.ensureTotalCapacityContext(gpa, new_capacity, undefined);
}
Increases capacity, guaranteeing that insertions up until the
expected_countwill not cause an allocation, and therefore cannot fail.