DoxigAlpha

appendAssumeCapacity

Extend the list by 1 element, but asserting self.capacity is sufficient to hold an additional item.

Function parameters

Parameters

#
self:*Self
elem:T

A MultiArrayList stores a list of a struct or tagged union type.

Functions

#
MultiArrayList
A MultiArrayList stores a list of a struct or tagged union type.

Source

Implementation

#
pub fn appendAssumeCapacity(self: *Self, elem: T) void {
    assert(self.len < self.capacity);
    self.len += 1;
    self.set(self.len - 1, elem);
}