diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-11-21 14:26:23 +0000 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-11-21 14:26:23 +0000 |
| commit | f987a06cccc47b79e78203870eac443051002895 (patch) | |
| tree | b86b2d9f183722cefebec23e10408364aba969bb /exercises/056_unions2.zig | |
| parent | b7015c2d9d50da77cf1a3897f84e1b736649beef (diff) | |
| parent | b0511bb3c7ac0293edbb68fc54fbd8eba27a5882 (diff) | |
Merge pull request 'Converted var to const if there is no mutation in the var.' (#28) from var_const into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/28
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! ", .{}); |
