Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions stdlib/public/core/UnsafeBufferPointerSlice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,9 @@ extension Slice {
/// initialized by this function.
@inlinable
@_alwaysEmitIntoClient
public func initialize<C: Collection>(
fromContentsOf source: C
) -> Index where Base == UnsafeMutableBufferPointer<C.Element> {
public func initialize<Element>(
fromContentsOf source: some Collection<Element>
) -> Index where Base == UnsafeMutableBufferPointer<Element> {
let buffer = Base(rebasing: self)
let index = buffer.initialize(fromContentsOf: source)
let distance = buffer.distance(from: buffer.startIndex, to: index)
Expand Down Expand Up @@ -833,9 +833,9 @@ extension Slice {
/// - Returns: An index one past the index of the last element updated.
@inlinable
@_alwaysEmitIntoClient
public func update<C: Collection>(
fromContentsOf source: C
) -> Index where Base == UnsafeMutableBufferPointer<C.Element> {
public func update<Element>(
fromContentsOf source: some Collection<Element>
) -> Index where Base == UnsafeMutableBufferPointer<Element> {
let buffer = Base(rebasing: self)
let index = buffer.update(fromContentsOf: source)
let distance = buffer.distance(from: buffer.startIndex, to: index)
Expand Down