Skip to content

add CollectionDifference.inverse() and test coverage #25825

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
Jul 9, 2019

Conversation

numist
Copy link
Member

@numist numist commented Jun 27, 2019

Per the amendment proposed on the forums, this method allows convenient production of diffs for reverting their original's application. IoW:

let diff = b.difference(from: a)
assert( a == a.applying(diff).applying(diff.inverse()) )

@numist
Copy link
Member Author

numist commented Jun 27, 2019

@swift-ci Please test

@itingliu
Copy link

LGTM

@numist numist merged commit 3924d1a into swiftlang:master Jul 9, 2019
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