Skip to content

Commit 4011ace

Browse files
committed
Fixes
1 parent bf9cd60 commit 4011ace

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/Utilities/objective_container.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ function MOI.supports(
116116
return true
117117
end
118118

119-
struct UnsafeObjectiveFunction{F<:MOI.AbstractFunction} <: MOI.AbstractModelAttribute end
119+
struct UnsafeObjectiveFunction{F<:MOI.AbstractFunction} <:
120+
MOI.AbstractModelAttribute end
120121

121122
function MOI.get(model::MOI.ModelLike, ::UnsafeObjectiveFunction{F}) where {F}
122123
return MOI.get(model, MOI.ObjectiveFunction{F}())

src/Utilities/universalfallback.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ end
534534

535535
function MOI.get(
536536
uf::UniversalFallback,
537-
attr::Union{MOI.UnsafeObjectiveFunction{F},MOI.ObjectiveFunction{F}},
537+
attr::Union{UnsafeObjectiveFunction{F},MOI.ObjectiveFunction{F}},
538538
)::F where {F}
539539
if uf.objective === nothing
540540
return MOI.get(uf.model, attr)
@@ -866,7 +866,11 @@ end
866866

867867
function MOI.get(
868868
uf::UniversalFallback,
869-
attr::Union{MOI.UnsafeConstraintFunction,MOI.ConstraintFunction,MOI.ConstraintSet},
869+
attr::Union{
870+
UnsafeConstraintFunction,
871+
MOI.ConstraintFunction,
872+
MOI.ConstraintSet,
873+
},
870874
ci::MOI.ConstraintIndex,
871875
)
872876
return MOI.get(constraints(uf, ci), attr, ci)

0 commit comments

Comments
 (0)