Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
COBREXA.jl
Commits
96ff9e23
Commit
96ff9e23
authored
Oct 14, 2021
by
Miroslav Kratochvil
🚴
Committed by
Miroslav Kratochvil
Oct 15, 2021
Browse files
fix Serialized type boundedness
parent
525bcc51
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/base/types/Serialized.jl
View file @
96ff9e23
...
...
@@ -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
...
)
...
...
src/base/utils/Serialized.jl
View file @
96ff9e23
...
...
@@ -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
"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment