authorgravatar for scurest@users.noreply.github.comscurest <scurest@users.noreply.github.com> 2017-11-06 10:40:58-06:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-11-06 11:40:58-05:00
logf0dafd3f209a342f055850108651545bea9b065b
treeddd87ba451d7560295119bccdbf58eb8d2490639
parent52a29928628f042da6cb39b3c1f77af0bcb7dcd7

fix typos in std.io (#589)

Fixes a bug that prevented InStream.realAllAlloc from compiling.

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

std/io.zig+2-2
......@@ -308,7 +308,7 @@ pub const InStream = struct {
308308 readFn: fn(self: &InStream, buffer: []u8) -> %usize,
309309
310310 /// Replaces `buffer` contents by reading from the stream until it is finished.
311 /// If `buffer.len()` woould exceed `max_size`, `error.StreamTooLong` is returned and
311 /// If `buffer.len()` would exceed `max_size`, `error.StreamTooLong` is returned and
312312 /// the contents read from the stream are lost.
313313 pub fn readAllBuffer(self: &InStream, buffer: &Buffer, max_size: usize) -> %void {
314314 %return buffer.resize(0);
......@@ -339,7 +339,7 @@ pub const InStream = struct {
339339 var buf = Buffer.initNull(allocator);
340340 defer buf.deinit();
341341
342 %return self.readAllBuffer(self, &buf, max_size);
342 %return self.readAllBuffer(&buf, max_size);
343343 return buf.toOwnedSlice();
344344 }
345345