Skip to content

Commit 6067a4f

Browse files
authored
Improve type stability of more functions for JET (#2911)
1 parent c818160 commit 6067a4f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/FileFormats/MOF/read.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -393,15 +393,12 @@ end
393393

394394
function function_to_moi(
395395
::Val{:VectorOfVariables},
396-
::Type{T},
396+
::Type,
397397
object::Dict,
398398
name_map::Dict{String,MOI.VariableIndex},
399-
) where {T}
400-
return MOI.VectorOfVariables(
401-
MOI.VariableIndex[
402-
name_map[variable] for variable::String in object["variables"]
403-
],
404-
)
399+
)
400+
variables = [name_map[variable::String] for variable in object["variables"]]
401+
return MOI.VectorOfVariables(variables)
405402
end
406403

407404
function function_to_moi(

0 commit comments

Comments
 (0)