From f8e57af4ba6d31f7ad7d4098a316bacdafc71048 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Tue, 13 Sep 2022 13:40:18 -0600 Subject: [PATCH] [stdlib] use a primary associated type --- stdlib/public/core/UnsafeBufferPointerSlice.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stdlib/public/core/UnsafeBufferPointerSlice.swift b/stdlib/public/core/UnsafeBufferPointerSlice.swift index 70b7c1723767b..c5fb3354d0348 100644 --- a/stdlib/public/core/UnsafeBufferPointerSlice.swift +++ b/stdlib/public/core/UnsafeBufferPointerSlice.swift @@ -763,9 +763,9 @@ extension Slice { /// initialized by this function. @inlinable @_alwaysEmitIntoClient - public func initialize( - fromContentsOf source: C - ) -> Index where Base == UnsafeMutableBufferPointer { + public func initialize( + fromContentsOf source: some Collection + ) -> Index where Base == UnsafeMutableBufferPointer { let buffer = Base(rebasing: self) let index = buffer.initialize(fromContentsOf: source) let distance = buffer.distance(from: buffer.startIndex, to: index) @@ -833,9 +833,9 @@ extension Slice { /// - Returns: An index one past the index of the last element updated. @inlinable @_alwaysEmitIntoClient - public func update( - fromContentsOf source: C - ) -> Index where Base == UnsafeMutableBufferPointer { + public func update( + fromContentsOf source: some Collection + ) -> Index where Base == UnsafeMutableBufferPointer { let buffer = Base(rebasing: self) let index = buffer.update(fromContentsOf: source) let distance = buffer.distance(from: buffer.startIndex, to: index)