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
signaturelock-open 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(...@@ -24,7 +24,7 @@ pub fn PeekStream(
24 .Static => struct {24 .Static => struct {
25 pub fn init(base: InStreamType) Self {25 pub fn init(base: InStreamType) Self {
26 return .{26 return .{
27 .base = base,27 .unbuffered_in_stream = base,
28 .fifo = FifoType.init(),28 .fifo = FifoType.init(),
29 };29 };
30 }30 }
...@@ -32,7 +32,7 @@ pub fn PeekStream(...@@ -32,7 +32,7 @@ pub fn PeekStream(
32 .Slice => struct {32 .Slice => struct {
33 pub fn init(base: InStreamType, buf: []u8) Self {33 pub fn init(base: InStreamType, buf: []u8) Self {
34 return .{34 return .{
35 .base = base,35 .unbuffered_in_stream = base,
36 .fifo = FifoType.init(buf),36 .fifo = FifoType.init(buf),
37 };37 };
38 }38 }
...@@ -40,7 +40,7 @@ pub fn PeekStream(...@@ -40,7 +40,7 @@ pub fn PeekStream(
40 .Dynamic => struct {40 .Dynamic => struct {
41 pub fn init(base: InStreamType, allocator: *mem.Allocator) Self {41 pub fn init(base: InStreamType, allocator: *mem.Allocator) Self {
42 return .{42 return .{
43 .base = base,43 .unbuffered_in_stream = base,
44 .fifo = FifoType.init(allocator),44 .fifo = FifoType.init(allocator),
45 };45 };
46 }46 }
...@@ -61,7 +61,7 @@ pub fn PeekStream(...@@ -61,7 +61,7 @@ pub fn PeekStream(
61 if (dest_index == dest.len) return dest_index;61 if (dest_index == dest.len) return dest_index;
6262
63 // ask the backing stream for more63 // 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..]);
65 return dest_index;65 return dest_index;
66 }66 }
6767