-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
models: break out of loops #12159
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
Conversation
zeripath
left a comment
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 <[email protected]>
This fixes three spots in the
modelspackage where abreakwas being called from aswitchthat was inside aforloop, turning it into a no-op. This labels the outer loop so thebreakwill make it out of both theforand theswitch.