DoxigAlpha

addOneAssumeCapacity

Extend the list by 1 element, asserting self.capacity is sufficient to hold an additional item. Returns the newly reserved index with uninitialized data.

Function parameters

Parameters

#
self:*Self

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 addOneAssumeCapacity(self: *Self) usize {
    assert(self.len < self.capacity);
    const index = self.len;
    self.len += 1;
    return index;
}