diff options
| author | Dave Gauer <ratfactor@gmail.com> | 2022-01-06 18:08:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-06 18:08:43 -0500 |
| commit | 4bdbeadef5ab51fba6c96566dda071a82f8fc8fb (patch) | |
| tree | 62a24ae4a7c56aa5251cf5f2f35d8e706e1cd961 /exercises/031_switch2.zig | |
| parent | 75ea370352de75471ffb0df8c3076e824be9acd5 (diff) | |
| parent | 39e432748e067cce6f30fc7200685a994c1258ad (diff) | |
Merge pull request #88 from adamu/const
use const for variables that are never modified
Diffstat (limited to 'exercises/031_switch2.zig')
| -rw-r--r-- | exercises/031_switch2.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/031_switch2.zig b/exercises/031_switch2.zig index 1b3acdb..d8af6e6 100644 --- a/exercises/031_switch2.zig +++ b/exercises/031_switch2.zig @@ -15,7 +15,7 @@ pub fn main() void { const lang_chars = [_]u8{ 26, 9, 7, 42 }; for (lang_chars) |c| { - var real_char: u8 = switch (c) { + const real_char: u8 = switch (c) { 1 => 'A', 2 => 'B', 3 => 'C', |
