use const for variables that are never modified

This commit is contained in:
Adam Millerchip
2021-12-26 13:24:01 +09:00
parent f0357ea91c
commit 39e432748e
4 changed files with 6 additions and 6 deletions

View File

@@ -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',