diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-11-21 15:01:22 +0100 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-11-21 15:01:22 +0100 |
| commit | 7679f93f688452b2236d20b49f92569b8d56e20d (patch) | |
| tree | 26712b6e6bd28c5a265d9831246e1226f6944c4f /exercises/056_unions2.zig | |
| parent | b7015c2d9d50da77cf1a3897f84e1b736649beef (diff) | |
Converted var to const if there is no mutation in var.
This is checked from compiler version 0.12.0-dev.1664
Diffstat (limited to 'exercises/056_unions2.zig')
| -rw-r--r-- | exercises/056_unions2.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/056_unions2.zig b/exercises/056_unions2.zig index e4294db..c46d133 100644 --- a/exercises/056_unions2.zig +++ b/exercises/056_unions2.zig @@ -38,8 +38,8 @@ const Insect = union(InsectStat) { }; pub fn main() void { - var ant = Insect{ .still_alive = true }; - var bee = Insect{ .flowers_visited = 16 }; + const ant = Insect{ .still_alive = true }; + const bee = Insect{ .flowers_visited = 16 }; std.debug.print("Insect report! ", .{}); |
