mirror of
https://github.com/status-im/nim-serialization.git
synced 2025-02-17 06:27:02 +00:00
autoclose streams, fix #9
This commit is contained in:
parent
e874ae6766
commit
cb6055a8be
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user