Skip to content

Commit

Permalink
fix typos in std.io (#589)
Browse files Browse the repository at this point in the history
Fixes a bug that prevented InStream.realAllAlloc from compiling.
  • Loading branch information
scurest authored and andrewrk committed Nov 6, 2017
1 parent 52a2992 commit f0dafd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/io.zig
Expand Up @@ -308,7 +308,7 @@ pub const InStream = struct {
readFn: fn(self: &InStream, buffer: []u8) -> %usize,

/// Replaces `buffer` contents by reading from the stream until it is finished.
/// If `buffer.len()` woould exceed `max_size`, `error.StreamTooLong` is returned and
/// If `buffer.len()` would exceed `max_size`, `error.StreamTooLong` is returned and
/// the contents read from the stream are lost.
pub fn readAllBuffer(self: &InStream, buffer: &Buffer, max_size: usize) -> %void {
%return buffer.resize(0);
Expand Down Expand Up @@ -339,7 +339,7 @@ pub const InStream = struct {
var buf = Buffer.initNull(allocator);
defer buf.deinit();

%return self.readAllBuffer(self, &buf, max_size);
%return self.readAllBuffer(&buf, max_size);
return buf.toOwnedSlice();
}

Expand Down

0 comments on commit f0dafd3

Please sign in to comment.