pub fn moveToUnmanaged(self: *Self) Aligned(T, alignment)
Initializes an ArrayList with the items and capacity fields of this ArrayList. Empties this ArrayList.
items
capacity
self: *Self
116 117 118 119 120 121 122 123 124 125
pub fn moveToUnmanaged(self: *Self) Aligned(T, alignment) { const allocator = self.allocator; const result: Aligned(T, alignment) = .{ .items = self.items, .capacity = self.capacity, .pointer_stability = self.pointer_stability, }; self.* = init(allocator); return result; }
Initializes an ArrayList with the
itemsandcapacityfields of this ArrayList. Empties this ArrayList.