Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove un-used code #2546

Merged
merged 1 commit into from
Apr 6, 2021
Merged

Remove un-used code #2546

merged 1 commit into from
Apr 6, 2021

Conversation

odow
Copy link
Member

@odow odow commented Mar 30, 2021

It seems we actually have

JuMP.jl/src/variables.jl

Lines 166 to 195 in 3e517d7

"""
struct VariableNotOwned{V <: AbstractVariableRef} <: Exception
variable::V
end
The variable `variable` was used in a model different to
`owner_model(variable)`.
"""
struct VariableNotOwned{V<:AbstractVariableRef} <: Exception
variable::V
end
"""
check_belongs_to_model(func::AbstractJuMPScalar, model::AbstractModel)
Throw [`VariableNotOwned`](@ref) if the [`owner_model`](@ref) of one of the
variables of the function `func` is not `model`.
check_belongs_to_model(constraint::AbstractConstraint, model::AbstractModel)
Throw [`VariableNotOwned`](@ref) if the [`owner_model`](@ref) of one of the
variables of the constraint `constraint` is not `model`.
"""
function check_belongs_to_model end
function check_belongs_to_model(v::AbstractVariableRef, model::AbstractModel)
if owner_model(v) !== model
throw(VariableNotOwned(v))
end
end

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #2546 (8d7489d) into master (3e517d7) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2546      +/-   ##
==========================================
+ Coverage   92.94%   92.97%   +0.03%     
==========================================
  Files          44       44              
  Lines        5456     5454       -2     
==========================================
  Hits         5071     5071              
+ Misses        385      383       -2     
Impacted Files Coverage Δ
src/JuMP.jl 83.03% <ø> (+0.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e517d7...8d7489d. Read the comment docs.

@odow
Copy link
Member Author

odow commented Mar 31, 2021

@blegat I guess this is accidental?

@odow
Copy link
Member Author

odow commented Apr 5, 2021

@blegat Bump.

@odow odow merged commit 41e4bf0 into master Apr 6, 2021
@odow odow deleted the odow-patch-1 branch April 6, 2021 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants