authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-09-08 14:21:42-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-09-08 14:21:42-04:00
logfc9ff13fb610893ce1226c5c439e831f8b0569ee
treeed34f8fc1e9c143c59f00120c7a3269e049ee793
parentd324b1befa6c7f0fd5d18ffe45a98d104a62d8a0

std: avoid calling close twice in InStream

thanks ofelas for pointing this out

1 files changed, 3 insertions(+), 0 deletions(-)

std/io.zig+3
......@@ -191,6 +191,8 @@ pub struct InStream {
191191 }
192192 }
193193
194 /// Upon success, the stream is in an uninitialized state. To continue using it,
195 /// you must use the open() function.
194196 pub fn close(is: &InStream) -> %void {
195197 switch (@compileVar("os")) {
196198 linux => {
......@@ -206,6 +208,7 @@ pub struct InStream {
206208 else => error.Unexpected,
207209 }
208210 }
211 return;
209212 }
210213 },
211214 else => @compileError("unsupported OS"),