From a9f2298132fc238ec369cbe03de65a31ab0d0167 Mon Sep 17 00:00:00 2001 From: torque Date: Sun, 12 May 2024 18:48:18 -0700 Subject: [PATCH] fix useless var Unlike lists, this isn't mutated for maps because there's no intermediate builder object being used for maps (lists are assembled with an ArrayList, after which they are converted to plain slices). --- src/zaye.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zaye.zig b/src/zaye.zig index c3facb2..b9819e8 100644 --- a/src/zaye.zig +++ b/src/zaye.zig @@ -266,7 +266,7 @@ pub const Value = union(enum) { } fn endMap(self: *Builder, diag: *ParseDiagnostic) !void { - var top = self.container_stack.pop(); + const top = self.container_stack.pop(); if (top != .map) { diag.setMessage("map ended when a map was not the top container");