diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-12-09 14:18:05 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-12-09 14:18:05 +0700 |
commit | cb3888c390e424df9572083e9fcabf0cda4c0506 (patch) | |
tree | 8a9cb6ae2c8d4b457bbf938b31cda4c2feb0df56 /aoc | |
parent | 3f78c35f9d59ccc4ebee56f110933a2e770637fe (diff) | |
download | cp-cb3888c390e424df9572083e9fcabf0cda4c0506.tar.gz |
[aoc/2021/*/*.zig] Signal errors explicitly
Diffstat (limited to 'aoc')
-rw-r--r-- | aoc/2021/03/part-one.zig | 2 | ||||
-rw-r--r-- | aoc/2021/08/part-one.zig | 2 | ||||
-rw-r--r-- | aoc/2021/08/part-two.zig | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/aoc/2021/03/part-one.zig b/aoc/2021/03/part-one.zig index 6088925..0366434 100644 --- a/aoc/2021/03/part-one.zig +++ b/aoc/2021/03/part-one.zig @@ -4,7 +4,7 @@ const input = @embedFile("input"); const mean = @splat(12, @as(u16, '0' * 1000 + 500)); const pos = @Vector(12, u4){ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -pub fn main() !void { +pub fn main() void { var sum = @splat(12, @as(u16, 0)); var i = @as(usize, 0); while (i < input.len) : (i += 13) { diff --git a/aoc/2021/08/part-one.zig b/aoc/2021/08/part-one.zig index 0a9ad93..9f879e8 100644 --- a/aoc/2021/08/part-one.zig +++ b/aoc/2021/08/part-one.zig @@ -2,7 +2,7 @@ const print = std.debug.print; const std = @import("std"); const tokenize = std.mem.tokenize; -pub fn main() !void { +pub fn main() void { var count: usize = 0; defer print("{}\n", .{ count }); diff --git a/aoc/2021/08/part-two.zig b/aoc/2021/08/part-two.zig index 294e769..ae8bf09 100644 --- a/aoc/2021/08/part-two.zig +++ b/aoc/2021/08/part-two.zig @@ -17,7 +17,7 @@ const digits = [_]u7{ //8687497 }; -pub fn main() !void { +pub fn main() void { var sum: usize = 0; defer print("{}\n", .{ sum }); |