Skip to content

Commit 7cec5d1

Browse files
committed
[_CollectionsUtilities] Work around SR-14663
Unfortunate edge case: the new `initialize(fromContentsOf:)` from SE-0370 is calling withContiguousStorageIfAvailable, so it is subject to SR-14663. This means we can either choose to continue maintaining the workaround, or we can call the stdlib’s implementation, but not both.
1 parent 541bd53 commit 7cec5d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/_CollectionsUtilities/UnsafeMutableBufferPointer+SE-0370.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extension UnsafeMutableBufferPointer {
6464
fromContentsOf source: C
6565
) -> Index
6666
where C.Element == Element {
67-
let count = source.withContiguousStorageIfAvailable {
67+
let count = source._withContiguousStorageIfAvailable_SR14663 {
6868
guard let sourceAddress = $0.baseAddress, !$0.isEmpty else {
6969
return 0
7070
}

0 commit comments

Comments
 (0)