-
Notifications
You must be signed in to change notification settings - Fork 112
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
Use eachindex
instead of 1:length
, compare against nothing
with ===
#1899
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Note that I know the reasoning behind the argument for eachindex
, but that personally I am happy with the style we currently use, as it is IMHO clearer to reason about as a novice user and while debugging. Having said that, I wouldn't stand in the way of this being merged if you feel strongly about it 😊 (and I have been wrong about the virtues of generic programming in the past 🤷♂️)
No strong feelings involved, but I got somewhat annoyed by the tooltips and wanted to give this a shot. |
SciML/NonlinearSolve.jl#402 seems to have triggered a fix for the failing compilation - thanks @ranocha 🙏 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1899 +/- ##
==========================================
+ Coverage 89.54% 96.30% +6.76%
==========================================
Files 448 448
Lines 36068 36079 +11
==========================================
+ Hits 32296 34745 +2449
+ Misses 3772 1334 -2438
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Chris Rackauckas recommends
eachindex
over1:length