| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const nio = @import("./nio.zig"); |
| 3 | const extras = @import("extras"); |
| 3 | 4 | |
| 4 | 5 | pub fn BufferedReader(comptime buffer_size: usize, comptime ReaderType: type) type { |
| 5 | 6 | return struct { |
| ... | ... | @@ -39,7 +40,7 @@ pub fn BufferedReader(comptime buffer_size: usize, comptime ReaderType: type) ty |
| 39 | 40 | pub const skipBytes = R.skipBytes; |
| 40 | 41 | pub const skipUntilDelimiterOrEof = R.skipUntilDelimiterOrEof; |
| 41 | 42 | |
| 42 | | pub const ReadError = ReaderType.ReadError; |
| 43 | pub const ReadError = extras.Pointee(ReaderType).ReadError; |
| 43 | 44 | pub fn read(self: *Self, dest: []u8) ReadError!usize { |
| 44 | 45 | // First try reading from the already buffered data onto the destination. |
| 45 | 46 | const current = self.buf[self.start..self.end]; |