std: reader.skipBytes's num_bytes should be a u64

This commit is contained in:
daurnimator 2020-11-19 22:50:56 +11:00 committed by Andrew Kelley
parent 3468872d83
commit 0ab8ae944c

View File

@ -271,8 +271,9 @@ pub fn Reader(
buf_size: usize = 512,
};
// `num_bytes` is a `u64` to match `off_t`
/// Reads `num_bytes` bytes from the stream and discards them
pub fn skipBytes(self: Self, num_bytes: usize, comptime options: SkipBytesOptions) !void {
pub fn skipBytes(self: Self, num_bytes: u64, comptime options: SkipBytesOptions) !void {
var buf: [options.buf_size]u8 = undefined;
var remaining = num_bytes;