aboutsummaryrefslogtreecommitdiff
path: root/exercises/024_errors4.zig
diff options
context:
space:
mode:
authorChris Boesch <[email protected]>2023-06-22 16:51:03 +0200
committerGitHub <[email protected]>2023-06-22 16:51:03 +0200
commit2705e16c364f6a224e418fa895b9a60246a8bad0 (patch)
tree03e0207438be1b335d9121dd1bf6f974e2c2b0c3 /exercises/024_errors4.zig
parent9499e12469c7ebc481f73280f7a678415f44561b (diff)
parentd52f360731fcfaf47818addfd61332bf0c0e39a5 (diff)
downloadziglings-2705e16c364f6a224e418fa895b9a60246a8bad0.tar.xz
ziglings-2705e16c364f6a224e418fa895b9a60246a8bad0.zip
Merge pull request #329 from lorrding/refactor-var-to-const
Change `var` to `const` in some exercises
Diffstat (limited to 'exercises/024_errors4.zig')
-rw-r--r--exercises/024_errors4.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/exercises/024_errors4.zig b/exercises/024_errors4.zig
index c2f4f6f..02ec0f2 100644
--- a/exercises/024_errors4.zig
+++ b/exercises/024_errors4.zig
@@ -21,9 +21,9 @@ const MyNumberError = error{
pub fn main() void {
// The "catch 0" below is a temporary hack to deal with
// makeJustRight()'s returned error union (for now).
- var a: u32 = makeJustRight(44) catch 0;
- var b: u32 = makeJustRight(14) catch 0;
- var c: u32 = makeJustRight(4) catch 0;
+ const a: u32 = makeJustRight(44) catch 0;
+ const b: u32 = makeJustRight(14) catch 0;
+ const c: u32 = makeJustRight(4) catch 0;
std.debug.print("a={}, b={}, c={}\n", .{ a, b, c });
}