mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
Converted var to const if there is no mutation in var.
This is checked from compiler version 0.12.0-dev.1664
This commit is contained in:
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user