aboutsummaryrefslogtreecommitdiff
path: root/exercises/031_switch2.zig
diff options
context:
space:
mode:
authorAdam Millerchip <adam@millerchip.net>2021-12-26 13:24:01 +0900
committerAdam Millerchip <adam@millerchip.net>2022-01-01 02:20:26 +0900
commit669d4f7337d43628fd031888d9dc46d22289fcdf (patch)
tree15167bd3007c96b4cff06955755b1459d0d184d0 /exercises/031_switch2.zig
parentef9bdb13820d0e113673ce0565f4dbd5960b2d9f (diff)
downloadziglings-669d4f7337d43628fd031888d9dc46d22289fcdf.tar.gz
ziglings-669d4f7337d43628fd031888d9dc46d22289fcdf.tar.bz2
ziglings-669d4f7337d43628fd031888d9dc46d22289fcdf.tar.xz
ziglings-669d4f7337d43628fd031888d9dc46d22289fcdf.zip
use const for variables that are never modified
Diffstat (limited to 'exercises/031_switch2.zig')
-rw-r--r--exercises/031_switch2.zig2
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',