aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/exercises/024_errors4.zig
diff options
context:
space:
mode:
authorlording <mathias.berthonneau@gmail.com>2023-06-22 09:41:41 +0000
committerlording <mathias.berthonneau@gmail.com>2023-06-22 09:41:41 +0000
commitd2d3dfa277e7d2a22ebbaf9b47316363035ed500 (patch)
tree95b679455dcbb501f0a65d76fe7bc2b73a1ee32a /exercises/024_errors4.zig
parentf09a87c348bafb134e3f5eca0ef654cc2a20ceef (diff)
var to const when posssible
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 });
}