From 100aa6fbaf1a2359e8c12b6f82865060d12a47ee Mon Sep 17 00:00:00 2001 From: Jesse Rudolph Date: Tue, 2 Jun 2020 09:52:14 -0500 Subject: [PATCH] pass allocator to self.resize() in appendNTimes() --- lib/std/array_list.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/array_list.zig b/lib/std/array_list.zig index cbf0c8b929..e096a65491 100644 --- a/lib/std/array_list.zig +++ b/lib/std/array_list.zig @@ -402,7 +402,7 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ /// Allocates more memory as necessary. pub fn appendNTimes(self: *Self, allocator: *Allocator, value: T, n: usize) !void { const old_len = self.items.len; - try self.resize(self.items.len + n); + try self.resize(allocator, self.items.len + n); mem.set(T, self.items[old_len..self.items.len], value); }