| ... | @@ -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; |
| 62 | | 62 | |
| 63 | // ask the backing stream for more | 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 | return dest_index; | 65 | return dest_index; |
| 66 | } | 66 | } |
| 67 | | 67 | |