commit eddf491bf4babc0d3a2d6ea065c91d9a744ea090 (tree)
parent 318abaad02060a68070aa03fe86f04a7a52c51db
Author: Vincent Rischmann <vincent@rischmann.fr>
Date: Wed, 1 Apr 2020 12:26:49 +0200
io: fix PeekStream compilation
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/std/io/peek_stream.zig b/lib/std/io/peek_stream.zig
@@ -24,7 +24,7 @@ pub fn PeekStream(
.Static => struct {
pub fn init(base: InStreamType) Self {
return .{
- .base = base,
+ .unbuffered_in_stream = base,
.fifo = FifoType.init(),
};
}
@@ -32,7 +32,7 @@ pub fn PeekStream(
.Slice => struct {
pub fn init(base: InStreamType, buf: []u8) Self {
return .{
- .base = base,
+ .unbuffered_in_stream = base,
.fifo = FifoType.init(buf),
};
}
@@ -40,7 +40,7 @@ pub fn PeekStream(
.Dynamic => struct {
pub fn init(base: InStreamType, allocator: *mem.Allocator) Self {
return .{
- .base = base,
+ .unbuffered_in_stream = base,
.fifo = FifoType.init(allocator),
};
}
@@ -61,7 +61,7 @@ pub fn PeekStream(
if (dest_index == dest.len) return dest_index;
// ask the backing stream for more
- dest_index += try self.base.read(dest[dest_index..]);
+ dest_index += try self.unbuffered_in_stream.read(dest[dest_index..]);
return dest_index;
}