diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-02-01 23:32:09 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-02-01 23:32:09 -0500 |
| commit | 406496ca3371b7f50aee141fa37c52e86d96783f (patch) | |
| tree | 817587a21d0f0f12b871e5ff04955d5cd553ffb0 /std/io.zig | |
| parent | 13b36d458f6ba45fdda1c1510e056a7012fb3fff (diff) | |
| download | zig-406496ca3371b7f50aee141fa37c52e86d96783f.tar.gz zig-406496ca3371b7f50aee141fa37c52e86d96783f.zip | |
*WIP* error sets - allow peer type resolution to create new error set
Diffstat (limited to 'std/io.zig')
| -rw-r--r-- | std/io.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/std/io.zig b/std/io.zig index b9f7157101..e110d4ddf5 100644 --- a/std/io.zig +++ b/std/io.zig @@ -350,10 +350,11 @@ pub const File = struct { }; pub const InStream = struct { + // TODO allow specifying the error set /// Return the number of bytes read. If the number read is smaller than buf.len, it /// means the stream reached the end. Reaching the end of a stream is not an error /// condition. - readFn: fn(self: &InStream, buffer: []u8) !usize, + readFn: fn(self: &InStream, buffer: []u8) error!usize, /// Replaces `buffer` contents by reading from the stream until it is finished. /// If `buffer.len()` would exceed `max_size`, `error.StreamTooLong` is returned and |
