authorgravatar for euantorano@gmail.comEuan Torano <euantorano@gmail.com> 2019-08-05 19:18:19+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-20 14:52:10-04:00
log8c32c09807ed5ae28afce3e9cf3145f350f8c4e3
tree03f21f7227cd9ebcd5c871cf7363948da73c14a8
parentc175e53564e206f90dd8bd224b2db2fb7eca7c27
signaturelock-open Commit is signed but in an unrecognized format.

Fix InStream.readNoEof


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

std/io.zig+1-1
...@@ -146,7 +146,7 @@ pub fn InStream(comptime ReadError: type) type {...@@ -146,7 +146,7 @@ pub fn InStream(comptime ReadError: type) type {
146146
147 /// Same as `readFull` but end of stream returns `error.EndOfStream`.147 /// Same as `readFull` but end of stream returns `error.EndOfStream`.
148 pub fn readNoEof(self: *Self, buf: []u8) !void {148 pub fn readNoEof(self: *Self, buf: []u8) !void {
149 const amt_read = try self.read(buf);149 const amt_read = try self.readFull(buf);
150 if (amt_read < buf.len) return error.EndOfStream;150 if (amt_read < buf.len) return error.EndOfStream;
151 }151 }
152152