Skip to content

Commit d9a4488

Browse files
committed
[se-0370] use primary associated type
1 parent 44a349f commit d9a4488

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

stdlib/public/core/UnsafeBufferPointerSlice.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -758,10 +758,9 @@ extension Slice {
758758
/// initialized by this function.
759759
@inlinable
760760
@_alwaysEmitIntoClient
761-
public func initialize<C>(
762-
fromContentsOf source: C
763-
) -> Index
764-
where C : Collection, Base == UnsafeMutableBufferPointer<C.Element> {
761+
public func initialize<Element>(
762+
fromContentsOf source: some Collection<Element>
763+
) -> Index where Base == UnsafeMutableBufferPointer<Element> {
765764
let buffer = Base(rebasing: self)
766765
let index = buffer.initialize(fromContentsOf: source)
767766
let distance = buffer.distance(from: buffer.startIndex, to: index)

0 commit comments

Comments
 (0)