Skip to content

Prefix capture and tryCapture. #151

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

Merged
merged 1 commit into from
Feb 10, 2022
Merged

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Feb 9, 2022

Introduce free functions capture(_:), capture(_:transform:), tryCapture(_:transform:) for capturing. Remove postfix modifiers .capture and .tryCapture.

@rxwei rxwei requested a review from milseman February 9, 2022 06:23
@rxwei
Copy link
Contributor Author

rxwei commented Feb 9, 2022

@swift-ci please test Linux

Introduce free functions `capture(_:)`, `capture(_:_:)`, `tryCapture(_:_:)` for capturing. Deprecate postfix modifiers `.capture` and `.tryCapture`.
@rxwei
Copy link
Contributor Author

rxwei commented Feb 9, 2022

@swift-ci please test Linux

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

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

LGTM. In addition to number-order consistency, I think I like this better.

@rxwei rxwei merged commit 883d358 into swiftlang:main Feb 10, 2022
@rxwei rxwei deleted the prefix-capture branch February 10, 2022 00:29
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