-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Implement partition API change (SE-0120) #3517
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
@@ -907,16 +907,20 @@ func checkPartition_${'Predicate' if predicate else 'WhereElementIsComparable'}( | |||
|
|||
var c = makeWrappedCollectionWithComparableElement(elements) | |||
% end | |||
|
|||
let pivotElt = c.first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space before =
.
a299fdc
to
c46d57b
Compare
Special thanks to @aschwaighofer for help with these tests and fix-its!
@swift-ci Please test |
lessImpl: ((Int, Int) -> Bool), | ||
verifyOrder: Bool | ||
) { | ||
let extract = extractValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the extract
variable and just use extractValue
?
Adds a dispatch test for partition(by:), since it's now a protocol requirement. Also adds a new logging collection wrapper that only logs when _withUnsafeMutableBufferPointerIfSupported is called -- any calls to this method from dispatched methods are uncounted by the standard logging wrappers.
@swift-ci Please test |
@swift-ci Please test OS X platform |
public mutating func _withUnsafeMutableBufferPointerIfSupported<R>( | ||
_ body: @noescape (UnsafeMutablePointer<Iterator.Element>, Int) throws -> R | ||
) rethrows -> R? { | ||
print("Log._withUnsafeMutableBufferPointerIfSupported[selfType] += 1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debugging print?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😳 Removed.
@swift-ci Please smoke test and merge |
What's in this pull request?
This implements the partition API changes proposed in SE-0120.
Please don't merge until/unless the proposal is accepted.
Resolved bug number: (SR-1965)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.