summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-07-10 22:33:50 -0700
committerOri Bernstein <ori@eigenstate.org>2018-07-14 00:16:06 -0700
commit76ce9de16baeec77b86ece6825b90715b08545ba (patch)
tree888f95ee0744d5c3c879b81c7747984a1892b084
parent00963a8a8348d7ef25eaa31cf4b0b4a3cc4036d3 (diff)
downloadmc-76ce9de16baeec77b86ece6825b90715b08545ba.tar.gz
Make bio and regex disposable.
-rw-r--r--mbld/subtest.myr6
1 files changed, 2 insertions, 4 deletions
diff --git a/mbld/subtest.myr b/mbld/subtest.myr
index eb8acb4..e69c7c9 100644
--- a/mbld/subtest.myr
+++ b/mbld/subtest.myr
@@ -25,8 +25,8 @@ const showsub = {b, cmd, fd, logfd, failed
var f, log
var res
- f = bio.mkfile(fd, bio.Rd)
- log = bio.mkfile(logfd, bio.Wr)
+ f = auto bio.mkfile(fd, bio.Rd)
+ log = auto bio.mkfile(logfd, bio.Wr)
res = `std.None
match bio.readln(f)
| `std.Err `bio.Eof:
@@ -45,8 +45,6 @@ const showsub = {b, cmd, fd, logfd, failed
std.slfree(ln)
;;
- bio.close(f)
- bio.close(log)
-> res
}