From 794cc70d602bb22e9b0d1c9cc2e2dcc6d5c5a667 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 2 Dec 2021 22:11:06 -0500 Subject: [PATCH] Tweak day 1 code structure --- day1/src/main.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/day1/src/main.zig b/day1/src/main.zig index a0f913d..cb2e330 100644 --- a/day1/src/main.zig +++ b/day1/src/main.zig @@ -5,12 +5,13 @@ pub fn main() anyerror!void { defer arena.deinit(); const alloc = &arena.allocator; - // Part 1 + // Read our input var f = try std.fs.cwd().openFile("input", .{}); defer f.close(); var contents = try f.readToEndAlloc(alloc, std.math.maxInt(u32)); defer alloc.free(contents); + // Part 1 var depths = std.ArrayList(u32).init(alloc); defer depths.deinit();