Skip to content

Commit 6d0bbba

Browse files
committed
stdlib: update comments for the array buffer endCowMutation functions.
1 parent 51c2bd0 commit 6d0bbba

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

stdlib/public/core/ArrayBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ extension _ArrayBuffer {
138138

139139
/// Puts the buffer in an immutable state.
140140
///
141-
/// - Precondition: The buffer must be mutable.
141+
/// - Precondition: The buffer must be mutable or the empty array singleton.
142142
///
143143
/// - Warning: After a call to `endCOWMutation` the buffer must not be mutated
144144
/// until the next call of `beginCOWMutation`.

stdlib/public/core/ContiguousArrayBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
697697

698698
/// Puts the buffer in an immutable state.
699699
///
700-
/// - Precondition: The buffer must be mutable.
700+
/// - Precondition: The buffer must be mutable or the empty array singleton.
701701
///
702702
/// - Warning: After a call to `endCOWMutation` the buffer must not be mutated
703703
/// until the next call of `beginCOWMutation`.

stdlib/public/core/SliceBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ internal struct _SliceBuffer<Element>
329329

330330
/// Puts the buffer in an immutable state.
331331
///
332-
/// - Precondition: The buffer must be mutable.
332+
/// - Precondition: The buffer must be mutable or the empty array singleton.
333333
///
334334
/// - Warning: After a call to `endCOWMutation` the buffer must not be mutated
335335
/// until the next call of `beginCOWMutation`.

0 commit comments

Comments
 (0)