diff options
Diffstat (limited to 'src/day01.zig')
-rw-r--r-- | src/day01.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/day01.zig b/src/day01.zig index 33b0a67..d92e756 100644 --- a/src/day01.zig +++ b/src/day01.zig @@ -8,7 +8,7 @@ pub fn solve(part: []u8, buffer: []u8, allocator: std.mem.Allocator) !void { defer left.deinit(); defer right.deinit(); - if (std.mem.eql(u8, part, "part1")) { + if (std.mem.eql(u8, part, "1")) { try part1(&lines, &left, &right, allocator); } else { try part2(&lines, &left, &right, allocator); @@ -41,7 +41,7 @@ fn part1(lines: *std.mem.SplitIterator(u8, .scalar), left: *std.ArrayList(usize) } } - print("Sum is {d}\n", .{sum}); + print("{d}\n", .{sum}); } fn part2(lines: *std.mem.SplitIterator(u8, .scalar), left: *std.ArrayList(usize), right: *std.ArrayList(usize), allocator: std.mem.Allocator) !void { @@ -77,5 +77,5 @@ fn part2(lines: *std.mem.SplitIterator(u8, .scalar), left: *std.ArrayList(usize) }; } - print("Sum is {d}\n", .{sum}); + print("{d}\n", .{sum}); } |