mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: rename Array.appendContents(of:) to Array.append(contentsOf:)
This commit is contained in:
@@ -694,11 +694,11 @@ extension ${Self} : _ArrayProtocol {
|
||||
/// Append the elements of `newElements` to `self`.
|
||||
///
|
||||
/// - Complexity: O(*length of result*).
|
||||
public mutating func appendContents<
|
||||
public mutating func append<
|
||||
S : Sequence
|
||||
where
|
||||
S.Iterator.Element == Element
|
||||
>(of newElements: S) {
|
||||
>(contentsOf newElements: S) {
|
||||
self += newElements
|
||||
}
|
||||
|
||||
@@ -707,11 +707,11 @@ extension ${Self} : _ArrayProtocol {
|
||||
/// Append the elements of `newElements` to `self`.
|
||||
///
|
||||
/// - Complexity: O(*length of result*).
|
||||
public mutating func appendContents<
|
||||
public mutating func append<
|
||||
C : Collection
|
||||
where
|
||||
C.Iterator.Element == Element
|
||||
>(of newElements: C) {
|
||||
>(contentsOf newElements: C) {
|
||||
self += newElements
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user