pub fn shrinkRetainingCapacity(self: *Self, new_len: usize) void self: *Selfnew_len: usize974
975
976
977
978 pub fn shrinkRetainingCapacity(self: *Self, new_len: usize) void {
if (@sizeOf(ByIndexContext) != 0)
@compileError("Cannot infer context " ++ @typeName(Context) ++ ", call shrinkRetainingCapacityContext instead.");
return self.shrinkRetainingCapacityContext(new_len, undefined);
}
Shrinks the underlying
Entryarray tonew_lenelements and discards any associated index entries. Keeps capacity the same.Asserts the discarded entries remain initialized and capable of performing hash and equality checks. Any deinitialization of discarded entries must take place after calling this function.