DoxigAlpha

shrink

Function parameters

Parameters

#
self:*Self
new_len:usize

This is a stack data structure where pointers to indexes have the same lifetime as the data structure

Functions

#
SegmentedList
This is a stack data structure where pointers to indexes have the same lifetime as the data structure

Source

Implementation

#
pub fn shrink(self: *Self, new_len: usize) void {
    assert(new_len <= self.len);
    // TODO take advantage of the new realloc semantics
    self.len = new_len;
}