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

Update omit-return rule discussion to include examples using if/swift expressions #249

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

calda
Copy link
Member

@calda calda commented Nov 1, 2023

Now that we use Swift 5.9, the existing omit-return rule now also applies to functions / properties that have single-expression if/switch statements. Let's add some examples using this syntax to make it explicit that this existing rule applies to those cases. This is also potentially good educational content for anyone who doesn't know that this is permitted now.

Copy link
Contributor

@bachand bachand left a comment

Choose a reason for hiding this comment

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

Nice. This is great @calda !

@calda calda merged commit df452c4 into master Nov 10, 2023
5 checks passed
@calda calda deleted the cal--redundant-return-example branch November 10, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants