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/072_comptime7.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/072_comptime7.zig')
| -rw-r--r-- | exercises/072_comptime7.zig | 2 |
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... |
