Commit 0a220c9e authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

fix Serialized type boundedness

parent 1c545381
......@@ -12,6 +12,10 @@ internal model will be loaded on-demand by using any accessor, or by calling
mutable struct Serialized{M} <: MetabolicModel where {M<:MetabolicModel}
m::Maybe{M}
filename::String
Serialized{T}(filename::String) where {T} = new{T}(nothing, filename)
Serialized(model::T, filename::String) where {T<:MetabolicModel} =
new{T}(model, filename)
end
function _on_precached(m::Serialized, f, args...)
......
......@@ -11,7 +11,7 @@ function serialize_model(
filename::String,
)::Serialized{MM} where {MM<:MetabolicModel}
open(f -> serialize(f, model), filename, "w")
Serialized{MM}(nothing, filename)
Serialized{MM}(filename)
end
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment