Update for Zig 0.12.0
2 files changed, 3 insertions(+), 3 deletions(-)

M rpn.zig
M stack.zig
M rpn.zig +1 -1
@@ 30,7 30,7 @@ fn rpn(cmd: []const u8, vals: *Stack) !?
     const b = vals.pop().?;
     const a = vals.pop().?;
 
-    var result = switch (cmd[0]) {
+    const result = switch (cmd[0]) {
         '+' => add(a, b),
         '-' => sub(a, b),
         '*' => mul(a, b),

          
M stack.zig +2 -2
@@ 21,14 21,14 @@ pub const Stack = struct {
     }
 
     pub fn pop(self: *Self) ?f64 {
-        var popped: *Node = self.head orelse return null;
+        const popped: *Node = self.head orelse return null;
         defer self.allocator.destroy(popped);
         self.head = popped.next;
         return popped.data;
     }
 
     pub fn peek(self: *Self) ?f64 {
-        var next: *Node = self.head orelse return null;
+        const next: *Node = self.head orelse return null;
         return next.data;
     }