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/021_errors.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exercises/021_errors.zig') diff --git a/exercises/021_errors.zig b/exercises/021_errors.zig index cbb5ac8..7afeace 100644 --- a/exercises/021_errors.zig +++ b/exercises/021_errors.zig @@ -16,7 +16,7 @@ const MyNumberError = error{ const std = @import("std"); pub fn main() void { - var nums = [_]u8{ 2, 3, 4, 5, 6 }; + const nums = [_]u8{ 2, 3, 4, 5, 6 }; for (nums) |n| { std.debug.print("{}", .{n}); -- cgit v1.2.3-ZIG