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