mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 15:59:59 +00:00
var to const when posssible
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user