Skip to content

Commit 964d1af

Browse files
committed
Fix format
1 parent 195870f commit 964d1af

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Utilities/results.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ function _dual_objective_value(
114114
::Type{T},
115115
result_index::Integer,
116116
) where {T}
117-
func_constant = MOI.constant(MOI.get(model, MOI.ConstraintFunction(), ci), T)
117+
func_constant =
118+
MOI.constant(MOI.get(model, MOI.ConstraintFunction(), ci), T)
118119
set = MOI.get(model, MOI.ConstraintSet(), ci)
119120
dual = MOI.get(model, MOI.ConstraintDual(result_index), ci)
120121
constant = map(eachindex(func_constant)) do i
121-
func_constant[i] - if dual[i] < zero(dual[i])
122+
return func_constant[i] - if dual[i] < zero(dual[i])
122123
# The dual is negative so it is in the dual of the MOI.LessThan cone
123124
# hence the upper bound of the Interval set is tight
124125
set.upper[i]

test/Utilities/results.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ function test_hyperrectangle(T)
3939
)
4040
MOI.set(model, MOI.ConstraintDual(), c1, T[4, -3])
4141
MOI.set(model, MOI.ConstraintDual(), c2, T[-2, 5])
42-
@test -53 == @inferred MOI.Utilities.get_fallback(model, MOI.DualObjectiveValue(), T)
42+
@test -53 == @inferred MOI.Utilities.get_fallback(
43+
model,
44+
MOI.DualObjectiveValue(),
45+
T,
46+
)
4347
end
4448

4549
end

0 commit comments

Comments
 (0)