Merge pull request #10 from status-im/autoclose-streams

autoclose streams, fix #9
This commit is contained in:
Mamy Ratsimbazafy 2019-09-10 22:25:24 -04:00 committed by GitHub
commit 7a42cab625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ template loadFile*(Format: distinct type,
params: varargs[untyped]): auto =
mixin init, ReaderType
var stream = openFile(filename)
defer: stream.close() # TODO: destructors
# TODO:
# Remove this when statement once the following bug is fixed: