pub fn clone(self: Self) Allocator.Error!Self
Creates a copy of this ArrayList, using the same allocator.
self: Self
157 158 159 160 161
pub fn clone(self: Self) Allocator.Error!Self { var cloned = try Self.initCapacity(self.allocator, self.capacity); cloned.appendSliceAssumeCapacity(self.items); return cloned; }
Creates a copy of this ArrayList, using the same allocator.