From 7679f93f688452b2236d20b49f92569b8d56e20d Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Tue, 21 Nov 2023 15:01:22 +0100 Subject: Converted var to const if there is no mutation in var. This is checked from compiler version 0.12.0-dev.1664 --- exercises/057_unions3.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'exercises/057_unions3.zig') diff --git a/exercises/057_unions3.zig b/exercises/057_unions3.zig index 142180f..a5017d2 100644 --- a/exercises/057_unions3.zig +++ b/exercises/057_unions3.zig @@ -21,8 +21,8 @@ const Insect = union(InsectStat) { }; pub fn main() void { - var ant = Insect{ .still_alive = true }; - var bee = Insect{ .flowers_visited = 17 }; + const ant = Insect{ .still_alive = true }; + const bee = Insect{ .flowers_visited = 17 }; std.debug.print("Insect report! ", .{}); -- cgit v1.2.3