fn ensureTotalCapacityPrecise(self: *Self, new_capacity: usize) Allocator.Error!void

Modify the array so that it can hold new_capacity items. Like ensureTotalCapacity, but the resulting capacity is guaranteed to be equal to new_capacity. Invalidates pointers if additional memory is needed.

Parameters

self: *Self,
new_capacity: usize,