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

Fix return type for NodeCount and BarrierIterations #305

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

frapac
Copy link
Collaborator

@frapac frapac commented Oct 16, 2024

No description provided.

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.08%. Comparing base (7aae642) to head (e16f03f).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/MOI_wrapper.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #305      +/-   ##
==========================================
- Coverage   85.25%   85.08%   -0.18%     
==========================================
  Files           3        3              
  Lines        1004      999       -5     
==========================================
- Hits          856      850       -6     
- Misses        148      149       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1651,13 +1651,13 @@ function MOI.get(model::Optimizer, ::MOI.SolveTimeSec)
return p[]
end

function MOI.get(model::Optimizer, ::MOI.NodeCount)
function MOI.get(model::Optimizer, ::MOI.NodeCount)::Int64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it simpler just to use a return type annotation. It automatically lowers to return convert(Int64, p[])

@odow odow merged commit 2750930 into master Oct 16, 2024
4 of 6 checks passed
@odow odow deleted the fp/type_barrier_iteration branch October 16, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants