authorgravatar for vincent@rischmann.frVincent Rischmann <vincent@rischmann.fr> 2020-04-01 12:26:49+02:00
committergravatar for vincent@rischmann.frVincent Rischmann <vincent@rischmann.fr> 2020-04-01 12:26:49+02:00
logeddf491bf4babc0d3a2d6ea065c91d9a744ea090
tree62c6aaa78eaf03fba8e4e4409eef0380d2502e67
parent318abaad02060a68070aa03fe86f04a7a52c51db
signature Commit is signed but in an unrecognized format.

io: fix PeekStream compilation


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

lib/std/io/peek_stream.zig+4-4
......@@ -24,7 +24,7 @@ pub fn PeekStream(
2424 .Static => struct {
2525 pub fn init(base: InStreamType) Self {
2626 return .{
27 .base = base,
27 .unbuffered_in_stream = base,
2828 .fifo = FifoType.init(),
2929 };
3030 }
......@@ -32,7 +32,7 @@ pub fn PeekStream(
3232 .Slice => struct {
3333 pub fn init(base: InStreamType, buf: []u8) Self {
3434 return .{
35 .base = base,
35 .unbuffered_in_stream = base,
3636 .fifo = FifoType.init(buf),
3737 };
3838 }
......@@ -40,7 +40,7 @@ pub fn PeekStream(
4040 .Dynamic => struct {
4141 pub fn init(base: InStreamType, allocator: *mem.Allocator) Self {
4242 return .{
43 .base = base,
43 .unbuffered_in_stream = base,
4444 .fifo = FifoType.init(allocator),
4545 };
4646 }
......@@ -61,7 +61,7 @@ pub fn PeekStream(
6161 if (dest_index == dest.len) return dest_index;
6262
6363 // ask the backing stream for more
64 dest_index += try self.base.read(dest[dest_index..]);
64 dest_index += try self.unbuffered_in_stream.read(dest[dest_index..]);
6565 return dest_index;
6666 }
6767