File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ extension Slice where Base == UnsafeMutableRawBufferPointer {
26
26
/// be less than or equal to this buffer slice's `count`.
27
27
@inlinable
28
28
@_alwaysEmitIntoClient
29
- public func copyBytes< C: Collection > (
30
- from source: C
31
- ) where C. Element == UInt8 {
29
+ public func copyBytes( from source: some Collection < UInt8 > ) {
32
30
let buffer = Base ( rebasing: self )
33
31
buffer. copyBytes ( from: source)
34
32
}
Original file line number Diff line number Diff line change @@ -534,16 +534,15 @@ extension Unsafe${Mutable}RawBufferPointer {
534
534
/// - Parameter source: A collection of `UInt8` elements. `source.count` must
535
535
/// be less than or equal to this buffer's `count`.
536
536
@inlinable
537
- public func copyBytes< C: Collection > ( from source: C
538
- ) where C. Element == UInt8 {
537
+ public func copyBytes( from source: some Collection < UInt8 > ) {
539
538
_debugPrecondition ( source. count <= self . count,
540
539
" ${Self}.copyBytes source has too many elements " )
541
540
guard let position = _position else {
542
541
return
543
542
}
544
543
545
544
if source. withContiguousStorageIfAvailable ( {
546
- ( buffer: UnsafeBufferPointer < C . Element > ) -> Void in
545
+ ( buffer: UnsafeBufferPointer < UInt8 > ) -> Void in
547
546
if let base = buffer. baseAddress {
548
547
position. copyMemory ( from: base, byteCount: buffer. count)
549
548
}
You can’t perform that action at this time.
0 commit comments