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 @@ -708,9 +708,9 @@ extension Unsafe${Mutable}BufferPointer {
708
708
/// by this function.
709
709
@inlinable
710
710
@_alwaysEmitIntoClient
711
- public func initialize< C : Collection > (
712
- fromContentsOf source: C
713
- ) - > Index where C . Element == Element {
711
+ public func initialize(
712
+ fromContentsOf source: some Collection < Element >
713
+ ) -> Index {
714
714
let count = source. withContiguousStorageIfAvailable {
715
715
guard let sourceAddress = $0. baseAddress, !$0. isEmpty else {
716
716
return 0
@@ -811,9 +811,9 @@ extension Unsafe${Mutable}BufferPointer {
811
811
/// - Returns: An index one past the index of the last element updated.
812
812
@inlinable
813
813
@_alwaysEmitIntoClient
814
- public func update< C : Collection > (
815
- fromContentsOf source: C
816
- ) - > Index where C . Element == Element {
814
+ public func update(
815
+ fromContentsOf source: some Collection < Element >
816
+ ) -> Index {
817
817
let count = source. withContiguousStorageIfAvailable {
818
818
guard let sourceAddress = $0. baseAddress else {
819
819
return 0
Original file line number Diff line number Diff line change @@ -785,9 +785,9 @@ extension Slice {
785
785
/// initialized by this function.
786
786
@inlinable
787
787
@_alwaysEmitIntoClient
788
- public func initialize< C : Collection > (
789
- fromContentsOf source: C
790
- ) -> Index where Base == UnsafeMutableBufferPointer < C . Element > {
788
+ public func initialize< Element > (
789
+ fromContentsOf source: some Collection < Element >
790
+ ) -> Index where Base == UnsafeMutableBufferPointer < Element > {
791
791
let buffer = Base ( rebasing: self )
792
792
let index = buffer. initialize ( fromContentsOf: source)
793
793
let distance = buffer. distance ( from: buffer. startIndex, to: index)
@@ -855,9 +855,9 @@ extension Slice {
855
855
/// - Returns: An index one past the index of the last element updated.
856
856
@inlinable
857
857
@_alwaysEmitIntoClient
858
- public func update< C : Collection > (
859
- fromContentsOf source: C
860
- ) -> Index where Base == UnsafeMutableBufferPointer < C . Element > {
858
+ public func update< Element > (
859
+ fromContentsOf source: some Collection < Element >
860
+ ) -> Index where Base == UnsafeMutableBufferPointer < Element > {
861
861
let buffer = Base ( rebasing: self )
862
862
let index = buffer. update ( fromContentsOf: source)
863
863
let distance = buffer. distance ( from: buffer. startIndex, to: index)
You can’t perform that action at this time.
0 commit comments