| ... | ... | @@ -1602,6 +1602,7 @@ test containsAtLeast { |
| 1602 | 1602 | /// T specifies the return type, which must be large enough to store |
| 1603 | 1603 | /// the result. |
| 1604 | 1604 | pub fn readVarInt(comptime ReturnType: type, bytes: []const u8, endian: Endian) ReturnType { |
| 1605 | assert(@typeInfo(ReturnType).int.bits >= bytes.len * 8); |
| 1605 | 1606 | const bits = @typeInfo(ReturnType).int.bits; |
| 1606 | 1607 | const signedness = @typeInfo(ReturnType).int.signedness; |
| 1607 | 1608 | const WorkType = std.meta.Int(signedness, @max(16, bits)); |