Skip to content

Commit 1152347

Browse files
committed
[stdlib] remove primary associated type from copyBytes
- this caused an unexpected test failure, will change separately.
1 parent 71b6d99 commit 1152347

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

stdlib/public/core/UnsafeBufferPointerSlice.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ extension Slice where Base == UnsafeMutableRawBufferPointer {
2626
/// be less than or equal to this buffer slice's `count`.
2727
@inlinable
2828
@_alwaysEmitIntoClient
29-
public func copyBytes(from source: some Collection<UInt8>) {
29+
public func copyBytes<C: Collection>(
30+
from source: C
31+
) where C.Element == UInt8 {
3032
let buffer = Base(rebasing: self)
3133
buffer.copyBytes(from: source)
3234
}

stdlib/public/core/UnsafeRawBufferPointer.swift.gyb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,9 @@ extension Unsafe${Mutable}RawBufferPointer {
534534
/// - Parameter source: A collection of `UInt8` elements. `source.count` must
535535
/// be less than or equal to this buffer's `count`.
536536
@inlinable
537-
public func copyBytes(from source: some Collection<UInt8>) {
537+
public func copyBytes<C: Collection>(
538+
from source: C
539+
) where C.Element == UInt8 {
538540
guard let position = _position else {
539541
return
540542
}

0 commit comments

Comments
 (0)