-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
models: break out of loops #12159
models: break out of loops #12159
Conversation
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.
mea culpa.
will an empty case not result in the same result but not require a goto and lable? |
the error came from when during a failed refactor attempt I tried to move this out to a method that returned directly - but didn't I unwind the refactor completely |
Maybe break could be replaced with |
make lgtm work |
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This fixes three spots in the
models
package where abreak
was being called from aswitch
that was inside afor
loop, turning it into a no-op. This labels the outer loop so thebreak
will make it out of both thefor
and theswitch
.