Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unclosed open file when counting occurrences #1315

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/odoc/occurrences.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ let aggregate files file_list ~warnings_options:_ ~dst =
let files = files @ new_files in
let from_file file : Odoc_occurrences.Table.t =
let ic = open_in_bin (Fs.File.to_string file) in
Marshal.from_channel ic
let res = Marshal.from_channel ic in
close_in ic;
res
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have Fun.protect in Odoc_utils that can help.

in
let occtbl =
match files with
Expand Down
Loading