From 0ab8ae944cd2b48c783c4ca8963997b6af207d5e Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 19 Nov 2020 22:50:56 +1100 Subject: [PATCH] std: reader.skipBytes's num_bytes should be a u64 --- lib/std/io/reader.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/io/reader.zig b/lib/std/io/reader.zig index 705eb9e816..e174051518 100644 --- a/lib/std/io/reader.zig +++ b/lib/std/io/reader.zig @@ -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;