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/067_comptime2.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/067_comptime2.zig')
| -rw-r--r-- | exercises/067_comptime2.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/exercises/067_comptime2.zig b/exercises/067_comptime2.zig index 7d4bdb0..6b9b14a 100644 --- a/exercises/067_comptime2.zig +++ b/exercises/067_comptime2.zig @@ -38,16 +38,16 @@ pub fn main() void { var count = 0; count += 1; - var a1: [count]u8 = .{'A'} ** count; + const a1: [count]u8 = .{'A'} ** count; count += 1; - var a2: [count]u8 = .{'B'} ** count; + const a2: [count]u8 = .{'B'} ** count; count += 1; - var a3: [count]u8 = .{'C'} ** count; + const a3: [count]u8 = .{'C'} ** count; count += 1; - var a4: [count]u8 = .{'D'} ** count; + const a4: [count]u8 = .{'D'} ** count; print("{s} {s} {s} {s}\n", .{ a1, a2, a3, a4 }); |
