diff options
author | lording <mathias.berthonneau@gmail.com> | 2023-06-22 09:41:41 +0000 |
---|---|---|
committer | lording <mathias.berthonneau@gmail.com> | 2023-06-22 09:41:41 +0000 |
commit | d2d3dfa277e7d2a22ebbaf9b47316363035ed500 (patch) | |
tree | 95b679455dcbb501f0a65d76fe7bc2b73a1ee32a /exercises/023_errors3.zig | |
parent | f09a87c348bafb134e3f5eca0ef654cc2a20ceef (diff) |
var to const when posssible
Diffstat (limited to 'exercises/023_errors3.zig')
-rw-r--r-- | exercises/023_errors3.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/023_errors3.zig b/exercises/023_errors3.zig index 81dd733..195f21a 100644 --- a/exercises/023_errors3.zig +++ b/exercises/023_errors3.zig @@ -11,8 +11,8 @@ const std = @import("std"); const MyNumberError = error{TooSmall}; pub fn main() void { - var a: u32 = addTwenty(44) catch 22; - var b: u32 = addTwenty(4) ??? 22; + const a: u32 = addTwenty(44) catch 22; + const b: u32 = addTwenty(4) ??? 22; std.debug.print("a={}, b={}\n", .{ a, b }); } |