File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -711,9 +711,9 @@ extension Unsafe${Mutable}BufferPointer {
711
711
/// by this function.
712
712
@inlinable
713
713
@_alwaysEmitIntoClient
714
- public func initialize(
715
- fromContentsOf source: some Collection < Element >
716
- ) -> Index {
714
+ public func initialize< C : Collection > (
715
+ fromContentsOf source: C
716
+ ) - > Index where C . Element == Element {
717
717
let count = source. withContiguousStorageIfAvailable {
718
718
guard let sourceAddress = $0. baseAddress, !$0. isEmpty else {
719
719
return 0
@@ -814,9 +814,9 @@ extension Unsafe${Mutable}BufferPointer {
814
814
/// - Returns: An index one past the index of the last element updated.
815
815
@inlinable
816
816
@_alwaysEmitIntoClient
817
- public func update(
818
- fromContentsOf source: some Collection < Element >
819
- ) -> Index {
817
+ public func update< C : Collection > (
818
+ fromContentsOf source: C
819
+ ) - > Index where C . Element == Element {
820
820
let count = source. withContiguousStorageIfAvailable {
821
821
guard let sourceAddress = $0. baseAddress else {
822
822
return 0
Original file line number Diff line number Diff line change @@ -763,9 +763,9 @@ extension Slice {
763
763
/// initialized by this function.
764
764
@inlinable
765
765
@_alwaysEmitIntoClient
766
- public func initialize< Element > (
767
- fromContentsOf source: some Collection < Element >
768
- ) -> Index where Base == UnsafeMutableBufferPointer < Element > {
766
+ public func initialize< C : Collection > (
767
+ fromContentsOf source: C
768
+ ) -> Index where Base == UnsafeMutableBufferPointer < C . Element > {
769
769
let buffer = Base ( rebasing: self )
770
770
let index = buffer. initialize ( fromContentsOf: source)
771
771
let distance = buffer. distance ( from: buffer. startIndex, to: index)
@@ -833,9 +833,9 @@ extension Slice {
833
833
/// - Returns: An index one past the index of the last element updated.
834
834
@inlinable
835
835
@_alwaysEmitIntoClient
836
- public func update< Element > (
837
- fromContentsOf source: some Collection < Element >
838
- ) -> Index where Base == UnsafeMutableBufferPointer < Element > {
836
+ public func update< C : Collection > (
837
+ fromContentsOf source: C
838
+ ) -> Index where Base == UnsafeMutableBufferPointer < C . Element > {
839
839
let buffer = Base ( rebasing: self )
840
840
let index = buffer. update ( fromContentsOf: source)
841
841
let distance = buffer. distance ( from: buffer. startIndex, to: index)
You can’t perform that action at this time.
0 commit comments