Skip to content

Commit 43a5d4c

Browse files
committed
stdlib: rename Array.appendContents(of:) to Array.append(contentsOf:)
1 parent cf4bafe commit 43a5d4c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

stdlib/public/core/ArrayType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protocol _ArrayProtocol
4444
/// - Complexity: O(`self.count`).
4545
mutating func reserveCapacity(minimumCapacity: Int)
4646

47-
/// Operator form of `appendContentsOf`.
47+
/// Operator form of `append(contentsOf:)`.
4848
func += <
4949
S : Sequence where S.Iterator.Element == Iterator.Element
5050
>(lhs: inout Self, rhs: S)

stdlib/public/core/Arrays.swift.gyb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,11 +694,11 @@ extension ${Self} : _ArrayProtocol {
694694
/// Append the elements of `newElements` to `self`.
695695
///
696696
/// - Complexity: O(*length of result*).
697-
public mutating func appendContents<
697+
public mutating func append<
698698
S : Sequence
699699
where
700700
S.Iterator.Element == Element
701-
>(of newElements: S) {
701+
>(contentsOf newElements: S) {
702702
self += newElements
703703
}
704704

@@ -707,11 +707,11 @@ extension ${Self} : _ArrayProtocol {
707707
/// Append the elements of `newElements` to `self`.
708708
///
709709
/// - Complexity: O(*length of result*).
710-
public mutating func appendContents<
710+
public mutating func append<
711711
C : Collection
712712
where
713713
C.Iterator.Element == Element
714-
>(of newElements: C) {
714+
>(contentsOf newElements: C) {
715715
self += newElements
716716
}
717717

0 commit comments

Comments
 (0)