var to const when posssible

This commit is contained in:
lording 2023-06-22 09:41:41 +00:00
parent 1b1d6b020b
commit 533c8e217d
16 changed files with 27 additions and 27 deletions

View file

@ -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 });
}