Skip to content

[stdlib] CollectionOfOne.subscript: Replace setter with _modify #19952

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
Oct 19, 2018

Conversation

lorentey
Copy link
Member

CollectionOfOne is a MutableCollection; implementing _modify makes it provide direct access to its element, which can be of some benefit.

@lorentey
Copy link
Member Author

@swift-ci test

@airspeedswift
Copy link
Member

I wonder if there should be a test added across the board for all these types that checks in-place modification is happening.

@lorentey lorentey merged commit 248d04b into swiftlang:master Oct 19, 2018
@lorentey lorentey deleted the collectionofone-modify branch October 19, 2018 16:54
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