diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-11-15 16:16:08 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-11-15 16:16:08 -0500 |
| commit | ba361f31c610bb97958201391f929696afd7f5aa (patch) | |
| tree | c51734973b75638a87c7feaad965cf3d0b4fa1ad /std/io.zig | |
| parent | 3090f83800f936118dfd4145a5e5754b8e899f23 (diff) | |
| download | zig-ba361f31c610bb97958201391f929696afd7f5aa.tar.gz zig-ba361f31c610bb97958201391f929696afd7f5aa.zip | |
more fixes related to readStruct API
Diffstat (limited to 'std/io.zig')
| -rw-r--r-- | std/io.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/io.zig b/std/io.zig index 7459bbcdf5..6473d993c4 100644 --- a/std/io.zig +++ b/std/io.zig @@ -192,7 +192,7 @@ pub fn InStream(comptime ReadError: type) type { // Only extern and packed structs have defined in-memory layout. comptime assert(@typeInfo(T).Struct.layout != builtin.TypeInfo.ContainerLayout.Auto); var res: [1]T = undefined; - return self.readNoEof(@sliceToBytes(res[0..])); + try self.readNoEof(@sliceToBytes(res[0..])); return res[0]; } }; |
