aboutsummaryrefslogtreecommitdiff
path: root/exercises/021_errors.zig
diff options
context:
space:
mode:
authorDave Gauer <ratfactor@gmail.com>2022-01-06 18:08:43 -0500
committerGitHub <noreply@github.com>2022-01-06 18:08:43 -0500
commit0efa4c124265ca5c009d63942d863e3911ea3197 (patch)
tree62a24ae4a7c56aa5251cf5f2f35d8e706e1cd961 /exercises/021_errors.zig
parentd61a6e847425cf6fc8bb84bc1ffa59d259d85ccc (diff)
parent669d4f7337d43628fd031888d9dc46d22289fcdf (diff)
downloadziglings-0efa4c124265ca5c009d63942d863e3911ea3197.tar.gz
ziglings-0efa4c124265ca5c009d63942d863e3911ea3197.tar.bz2
ziglings-0efa4c124265ca5c009d63942d863e3911ea3197.tar.xz
ziglings-0efa4c124265ca5c009d63942d863e3911ea3197.zip
Merge pull request #88 from adamu/const
use const for variables that are never modified
Diffstat (limited to 'exercises/021_errors.zig')
-rw-r--r--exercises/021_errors.zig2
1 files changed, 1 insertions, 1 deletions
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});