mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
std: avoid calling close twice in InStream
thanks ofelas for pointing this out
This commit is contained in:
parent
d324b1befa
commit
fc9ff13fb6
@ -191,6 +191,8 @@ pub struct InStream {
|
||||
}
|
||||
}
|
||||
|
||||
/// Upon success, the stream is in an uninitialized state. To continue using it,
|
||||
/// you must use the open() function.
|
||||
pub fn close(is: &InStream) -> %void {
|
||||
switch (@compileVar("os")) {
|
||||
linux => {
|
||||
@ -206,6 +208,7 @@ pub struct InStream {
|
||||
else => error.Unexpected,
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
},
|
||||
else => @compileError("unsupported OS"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user