Skip to content

Commit

Permalink
Fix serialize not closing files
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonOresten committed Dec 19, 2024
1 parent 903c7ab commit 5141e4b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/store/store.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ This function creates a new `ProteinStructureStore` and writes each structure in
Each structure is stored using its name as the key.
"""
function serialize(filename::AbstractString, structures::AbstractVector{<:ProteinStructure})
store = ProteinStructureStore(filename, "cw")
for structure in structures
store[structure.name] = structure
ProteinStructureStore(filename, "cw") do store
for structure in structures
store[structure.name] = structure
end
end
return nothing
return filename
end

"""
Expand Down

0 comments on commit 5141e4b

Please sign in to comment.