authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-02-28 23:30:19 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-02-28 23:30:19 -08:00
logf8a50c07032a62651328861353d24485b73d3976
treed23238472a9dbc7cdf214cfb59eff0e2dc139036
parent1da74fba8c47fde0af1459afa152742821590100

dont log in readExpected


1 files changed, 1 insertions(+), 2 deletions(-)

src/lib.zig+1-2
...@@ -276,10 +276,9 @@ pub fn readEnumBig(reader: anytype, comptime E: type) !E {...@@ -276,10 +276,9 @@ pub fn readEnumBig(reader: anytype, comptime E: type) !E {
276}276}
277277
278pub fn readExpected(reader: anytype, expected: []const u8) !bool {278pub fn readExpected(reader: anytype, expected: []const u8) !bool {
279 for (expected, 0..) |item, i| {279 for (expected) |item| {
280 const actual = try reader.readByte();280 const actual = try reader.readByte();
281 if (actual != item) {281 if (actual != item) {
282 std.log.err("expected '{d}' at index {d}, found: '{d}'", .{ item, i, actual });
283 return false;282 return false;
284 }283 }
285 }284 }