We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44a349f commit d9a4488Copy full SHA for d9a4488
stdlib/public/core/UnsafeBufferPointerSlice.swift
@@ -758,10 +758,9 @@ extension Slice {
758
/// initialized by this function.
759
@inlinable
760
@_alwaysEmitIntoClient
761
- public func initialize<C>(
762
- fromContentsOf source: C
763
- ) -> Index
764
- where C : Collection, Base == UnsafeMutableBufferPointer<C.Element> {
+ public func initialize<Element>(
+ fromContentsOf source: some Collection<Element>
+ ) -> Index where Base == UnsafeMutableBufferPointer<Element> {
765
let buffer = Base(rebasing: self)
766
let index = buffer.initialize(fromContentsOf: source)
767
let distance = buffer.distance(from: buffer.startIndex, to: index)
0 commit comments