Skip to content

Use new shorthand syntax for unwrapping optionals #6329

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

Conversation

sheikhbayazid
Copy link
Contributor

Use new shorthand syntax for unwrapping optional values

Motivation:

Using new shorthand syntax would make the code easier to read. Since we have the support to add the shorthand syntax for guard let and if let, it makes the code more readable.

Modifications:

Instead of using if let value = value, used if let value same goes for guard let.

Result:

There is no change of any logic. Just improved the better syntax of unwrapping optionals.

Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Seems legit, thanks!

@MaxDesiatov
Copy link
Contributor

@swift-ci smoke test

@tomerd
Copy link
Contributor

tomerd commented Mar 27, 2023

thanks @sheikhbayazid

@tomerd tomerd merged commit 6035562 into swiftlang:main Mar 27, 2023
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.

3 participants