| ... | ... | @@ -308,7 +308,7 @@ pub const InStream = struct { |
| 308 | 308 | readFn: fn(self: &InStream, buffer: []u8) -> %usize, |
| 309 | 309 | |
| 310 | 310 | /// 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 |
| 312 | 312 | /// the contents read from the stream are lost. |
| 313 | 313 | pub fn readAllBuffer(self: &InStream, buffer: &Buffer, max_size: usize) -> %void { |
| 314 | 314 | %return buffer.resize(0); |
| ... | ... | @@ -339,7 +339,7 @@ pub const InStream = struct { |
| 339 | 339 | var buf = Buffer.initNull(allocator); |
| 340 | 340 | defer buf.deinit(); |
| 341 | 341 | |
| 342 | | %return self.readAllBuffer(self, &buf, max_size); |
| 342 | %return self.readAllBuffer(&buf, max_size); |
| 343 | 343 | return buf.toOwnedSlice(); |
| 344 | 344 | } |
| 345 | 345 | |