| author | |
| committer | |
| log | f7dff19f70cb267337139a74978a255b8bdee694 |
| tree | 675d35328b4f1c41ccc5d739a2b94b2c98a99b19 |
| parent | 5fc8936866ce781c435d191c986d7c185072dc4f |
1 files changed, 1 insertions(+), 0 deletions(-)
src/lib.zig+1| ... | ... | @@ -377,6 +377,7 @@ pub fn hashBytes(comptime Algo: type, bytes: []const u8) [Algo.digest_length]u8 |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | pub fn readType(reader: anytype, comptime T: type, endian: std.builtin.Endian) !T { |
| 380 | if (T == u8) return reader.readByte(); // single bytes dont have an endianness | |
| 380 | 381 | return switch (@typeInfo(T)) { |
| 381 | 382 | .Struct => |t| { |
| 382 | 383 | switch (t.layout) { |