Skip to content

Commit bc5f015

Browse files
committed
Match docs to current behavior.
Confirmed this change on using the swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-22-a toolchain, Apple Swift version 5.2-dev (Swift d3f0448). Fixes rdar://problem/58717942
1 parent c0e2f08 commit bc5f015

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

stdlib/public/core/Array.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ extension Array: _ArrayProtocol {
432432
///
433433
/// numbers.append(contentsOf: stride(from: 60, through: 100, by: 10))
434434
/// // numbers.count == 10
435-
/// // numbers.capacity == 12
435+
/// // numbers.capacity == 10
436436
@inlinable
437437
public var capacity: Int {
438438
return _getCapacity()

stdlib/public/core/ArraySlice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ extension ArraySlice: _ArrayProtocol {
249249
///
250250
/// numbers.append(contentsOf: stride(from: 60, through: 100, by: 10))
251251
/// // numbers.count == 10
252-
/// // numbers.capacity == 12
252+
/// // numbers.capacity == 10
253253
@inlinable
254254
public var capacity: Int {
255255
return _getCapacity()

stdlib/public/core/ContiguousArray.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ extension ContiguousArray: _ArrayProtocol {
120120
///
121121
/// numbers.append(contentsOf: stride(from: 60, through: 100, by: 10))
122122
/// // numbers.count == 10
123-
/// // numbers.capacity == 12
123+
/// // numbers.capacity == 10
124124
@inlinable
125125
public var capacity: Int {
126126
return _getCapacity()

0 commit comments

Comments
 (0)