From 669d4f7337d43628fd031888d9dc46d22289fcdf Mon Sep 17 00:00:00 2001 From: Adam Millerchip Date: Sun, 26 Dec 2021 13:24:01 +0900 Subject: use const for variables that are never modified --- exercises/031_switch2.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exercises/031_switch2.zig') 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', -- cgit v1.2.3-ZIG