mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
* [stdlib] Deprecate MutableCollection._withUnsafeMutableBufferPointerIfSupported In Swift 5.0, [SE-0237] introduced the public `MutableCollection.withContiguousMutableStorageIfAvailable` method. It’s time we migrated off the old, underscored variant and deprecated it. The default `MutableCollection.sort` and `.partition(by:)` implementations are currently calling this hidden method rather than the documented interface, preventing custom Collection implementations from achieving good performance, even if they have contiguous storage. [SE-0237]: https://github.com/apple/swift-evolution/blob/master/proposals/0237-contiguous-collection.md * [test] Update tests for stdlib behavior changes * Update stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift Co-authored-by: Nate Cook <natecook@apple.com> * Update stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift Co-authored-by: Nate Cook <natecook@apple.com> * Apply suggestions from code review Co-authored-by: Nate Cook <natecook@apple.com> * [test] LoggingMutableCollection: Fix logging targets * [stdlib] Fix warning by restoring original workaround Co-authored-by: Nate Cook <natecook@apple.com>