Skip to content

Commit 2cd14ff

Browse files
authored
Remove unreachable branches in RawOptimizerAttribute (#83)
1 parent ad6e8f4 commit 2cd14ff

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/MOI_wrapper.jl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,29 +104,13 @@ function MOI.supports(::Optimizer, param::MOI.RawOptimizerAttribute)
104104
end
105105

106106
function MOI.set(model::Optimizer, param::MOI.RawOptimizerAttribute, value)
107-
if !(param.name isa String)
108-
Base.depwarn(
109-
"passing `$(param.name)` to `MOI.RawOptimizerAttribute` as type " *
110-
"`$(typeof(param.name))` is deprecated. Use a string instead.",
111-
Symbol("MOI.set"),
112-
)
113-
end
114107
if !MOI.supports(model, param)
115108
throw(MOI.UnsupportedAttribute(param))
116109
end
117110
return model.options[Symbol(param.name)] = value
118111
end
119112

120113
function MOI.get(model::Optimizer, param::MOI.RawOptimizerAttribute)
121-
# TODO: This gives a poor error message if the name of the parameter is
122-
# invalid.
123-
if !(param.name isa String)
124-
Base.depwarn(
125-
"passing `$(param.name)` to `MOI.RawOptimizerAttribute` as type " *
126-
"`$(typeof(param.name))` is deprecated. Use a string instead.",
127-
Symbol("MOI.set"),
128-
)
129-
end
130114
return model.options[Symbol(param.name)]
131115
end
132116

0 commit comments

Comments
 (0)