summaryrefslogtreecommitdiff
path: root/exercises/072_comptime7.zig
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2023-11-21 14:26:23 +0000
committerChris Boesch <chrboesch@noreply.codeberg.org>2023-11-21 14:26:23 +0000
commitf987a06cccc47b79e78203870eac443051002895 (patch)
treeb86b2d9f183722cefebec23e10408364aba969bb /exercises/072_comptime7.zig
parentb7015c2d9d50da77cf1a3897f84e1b736649beef (diff)
parentb0511bb3c7ac0293edbb68fc54fbd8eba27a5882 (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/072_comptime7.zig')
-rw-r--r--exercises/072_comptime7.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/072_comptime7.zig b/exercises/072_comptime7.zig
index 9bc30fb..631e75b 100644
--- a/exercises/072_comptime7.zig
+++ b/exercises/072_comptime7.zig
@@ -39,7 +39,7 @@ pub fn main() void {
// This gets the digit from the "instruction". Can you
// figure out why we subtract '0' from it?
- comptime var digit = instructions[i + 1] - '0';
+ const digit = instructions[i + 1] - '0';
// This 'switch' statement contains the actual work done
// at runtime. At first, this doesn't seem exciting...