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

Editorial: break from the inner invoke loop rather than returning #1325

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

annevk
Copy link
Member

@annevk annevk commented Nov 18, 2024

This is slightly cleaner and less confusing (to me anyway).


Preview | Diff

This is slightly cleaner and less confusing (to me anyway).
@annevk annevk requested a review from domenic November 18, 2024 10:59
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Although I usually like early return, I agree break is clearer here. Maybe because:

  • There's a return value, so this is slight amounts of deduping.
  • The return statement is immediately afterward.

@annevk annevk merged commit bb30d16 into main Nov 19, 2024
2 checks passed
@annevk annevk deleted the inner-invoke-loop branch November 19, 2024 07:36
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