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

[stdlib] Improve default implementation of Collection.distance(from:to:) #13292

Merged
merged 1 commit into from Dec 7, 2017

Conversation

moiseev
Copy link
Contributor

@moiseev moiseev commented Dec 6, 2017

No description provided.

@moiseev
Copy link
Contributor Author

moiseev commented Dec 6, 2017

@swift-ci Please test

1 similar comment
@moiseev
Copy link
Contributor Author

moiseev commented Dec 6, 2017

@swift-ci Please test

@apple apple deleted a comment from swift-ci Dec 6, 2017
@apple apple deleted a comment from swift-ci Dec 6, 2017
@swift-ci
Copy link
Collaborator

swift-ci commented Dec 6, 2017

Build failed
Swift Test Linux Platform
Git Sha - bf89f59fbb67a0dc15ea6daa2f91f619d1f16d19

@swift-ci
Copy link
Collaborator

swift-ci commented Dec 6, 2017

Build failed
Swift Test OS X Platform
Git Sha - bf89f59fbb67a0dc15ea6daa2f91f619d1f16d19

@swift-ci
Copy link
Collaborator

swift-ci commented Dec 6, 2017

Build comment file:

Build failed before running benchmark.


@moiseev
Copy link
Contributor Author

moiseev commented Dec 6, 2017

@swift-ci Please test

@apple apple deleted a comment from swift-ci Dec 6, 2017
Copy link
Member

@natecook1000 natecook1000 left a comment

Choose a reason for hiding this comment

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

LGTM!

@swift-ci
Copy link
Collaborator

swift-ci commented Dec 6, 2017

Build failed
Swift Test OS X Platform
Git Sha - bf89f59fbb67a0dc15ea6daa2f91f619d1f16d19

@moiseev
Copy link
Contributor Author

moiseev commented Dec 7, 2017

@swift-ci Please clean test

@apple apple deleted a comment from swift-ci Dec 7, 2017
@apple apple deleted a comment from swift-ci Dec 7, 2017
@moiseev moiseev merged commit 72948ca into apple:master Dec 7, 2017
@moiseev moiseev deleted the collection-distance branch December 7, 2017 02:19
var _start: Index
let _end: Index
let step: IndexDistance
if start > end {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use > on indexes?

Copy link
Member

Choose a reason for hiding this comment

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

Yep! Comparable is their one requirement.

Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, somehow I had it in my mind that they were just Equatable. Well this is nice, then.

Copy link
Member

Choose a reason for hiding this comment

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

You're not wrong! That was the case before the big collections-move-indices change: http://swiftdoc.org/v2.2/protocol/ForwardIndexType/

@moiseev
Copy link
Contributor Author

moiseev commented Dec 8, 2017

Reverted in #13328

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.

None yet

4 participants