From cf67d30cdcdd46264e59184ff6a1bf9062a77878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20=28xq=29=20Quei=C3=9Fner?= Date: Thu, 13 Feb 2020 10:37:49 +0100 Subject: [PATCH] Makes ArenaAllocator.deinit() not require a mutable reference. --- lib/std/heap.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/heap.zig b/lib/std/heap.zig index e7196f82f2..1bce45081d 100644 --- a/lib/std/heap.zig +++ b/lib/std/heap.zig @@ -533,7 +533,7 @@ pub const ArenaAllocator = struct { }; } - pub fn deinit(self: *ArenaAllocator) void { + pub fn deinit(self: ArenaAllocator) void { var it = self.buffer_list.first; while (it) |node| { // this has to occur before the free because the free frees node