summaryrefslogtreecommitdiff
path: root/exercises/067_comptime2.zig
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2023-11-21 15:01:22 +0100
committerChris Boesch <chrboesch@noreply.codeberg.org>2023-11-21 15:01:22 +0100
commit7679f93f688452b2236d20b49f92569b8d56e20d (patch)
tree26712b6e6bd28c5a265d9831246e1226f6944c4f /exercises/067_comptime2.zig
parentb7015c2d9d50da77cf1a3897f84e1b736649beef (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/067_comptime2.zig')
-rw-r--r--exercises/067_comptime2.zig8
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 });