Skip to content

Commit f0dafd3

Browse files
scurestandrewrk
authored andcommittedNov 6, 2017
fix typos in std.io (#589)
Fixes a bug that prevented InStream.realAllAlloc from compiling.
1 parent 52a2992 commit f0dafd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎std/io.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)
Please sign in to comment.