You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If :file.read/2 returns anything other than {:ok, data}, the file won't be closed. One possible solution is to use File.open/3 with a function as an argument because it ensures the file will be closed even in case of error:
Consider the implementation of
Infer.get_from_path/1,2
:infer/lib/infer.ex
Lines 46 to 53 in 65beb86
If
:file.read/2
returns anything other than{:ok, data}
, the file won't be closed. One possible solution is to useFile.open/3
with a function as an argument because it ensures the file will be closed even in case of error:(this implementation would also fix #9)
The text was updated successfully, but these errors were encountered: