diff options
Diffstat (limited to 'day3.zig')
-rw-r--r-- | day3.zig | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -17,7 +17,7 @@ const Grid = struct { span_ix: []usize, // grid mapping of index into spans list fn init(a: std.mem.Allocator, input: []const u8) !Grid { - var spix = try a.alloc(usize, input.len); + const spix = try a.alloc(usize, input.len); @memset(spix, std.math.maxInt(usize)); errdefer a.free(spix); @@ -173,10 +173,10 @@ fn solve_pt2(a: std.mem.Allocator, input: []const u8) !u32 { } var ki = spixes.keyIterator(); if (ki.next()) |first| { - var m = allSpans.items[first.*]; + const m = allSpans.items[first.*]; //std.log.warn("span val m{}", .{m}); if (ki.next()) |second| { - var m2 = allSpans.items[second.*]; + const m2 = allSpans.items[second.*]; //std.log.warn("span val m2{}", .{m2}); // _EXACTLY_ two gears! if (ki.next() == null) { |