diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-11-21 15:01:22 +0100 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-11-21 15:01:22 +0100 |
| commit | 7679f93f688452b2236d20b49f92569b8d56e20d (patch) | |
| tree | 26712b6e6bd28c5a265d9831246e1226f6944c4f /exercises/072_comptime7.zig | |
| parent | b7015c2d9d50da77cf1a3897f84e1b736649beef (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/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... |
