Skip to content

Commit a9e0af4

Browse files
committed
[stdlib] make Sequence's _copyContents call into a non-protocol function
1 parent 23bed31 commit a9e0af4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/public/core/Sequence.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,13 @@ extension Sequence {
11401140
@inlinable
11411141
public __consuming func _copyContents(
11421142
initializing buffer: UnsafeMutableBufferPointer<Element>
1143+
) -> (Iterator,UnsafeMutableBufferPointer<Element>.Index) {
1144+
return _copySequenceContents(initializing: buffer)
1145+
}
1146+
1147+
@inlinable
1148+
internal __consuming func _copySequenceContents(
1149+
initializing buffer: UnsafeMutableBufferPointer<Element>
11431150
) -> (Iterator,UnsafeMutableBufferPointer<Element>.Index) {
11441151
var it = self.makeIterator()
11451152
guard var ptr = buffer.baseAddress else { return (it,buffer.startIndex) }

0 commit comments

Comments
 (0)