Skip to content

Commit 44a349f

Browse files
committed
[se-0370] edit doc-comments for consistency
1 parent 88225a2 commit 44a349f

File tree

3 files changed

+135
-119
lines changed

3 files changed

+135
-119
lines changed

stdlib/public/core/UnsafeBufferPointer.swift.gyb

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,8 @@ extension Unsafe${Mutable}BufferPointer {
636636
return UnsafeMutableBufferPointer(start: base, count: count)
637637
}
638638

639-
/// Initializes every element in this buffer's memory to a copy of the given value.
639+
/// Initializes every element in this buffer's memory to
640+
/// a copy of the given value.
640641
///
641642
/// The destination memory must be uninitialized or the buffer's `Element`
642643
/// must be a trivial type. After a call to `initialize(repeating:)`, the
@@ -682,7 +683,8 @@ extension Unsafe${Mutable}BufferPointer {
682683
return source._copyContents(initializing: self)
683684
}
684685

685-
/// Initializes the buffer's memory with every element of the source.
686+
/// Initializes the buffer's memory with
687+
/// every element of the source.
686688
///
687689
/// Prior to calling the `initialize(fromContentsOf:)` method on a buffer,
688690
/// the memory referenced by the buffer must be uninitialized,
@@ -701,8 +703,9 @@ extension Unsafe${Mutable}BufferPointer {
701703
/// - Precondition: `self.count` >= `source.count`
702704
///
703705
/// - Parameter source: A collection of elements to be used to
704-
/// initialize the buffer's storage.
705-
/// - Returns: An index to the next uninitialized element in the buffer.
706+
/// initialize the buffer's storage.
707+
/// - Returns: The index one past the last element of the buffer initialized
708+
/// by this function.
706709
@inlinable
707710
@_alwaysEmitIntoClient
708711
public func initialize(
@@ -784,7 +787,8 @@ extension Unsafe${Mutable}BufferPointer {
784787
return (iterator, index)
785788
}
786789

787-
/// Updates the buffer's initialized memory with every element of the source.
790+
/// Updates the buffer's initialized memory with
791+
/// every element of the source.
788792
///
789793
/// Prior to calling the `update(fromContentsOf:)` method on a buffer,
790794
/// the first `source.count` elements of the buffer's memory must be
@@ -869,8 +873,8 @@ extension Unsafe${Mutable}BufferPointer {
869873
/// - Parameter source: A buffer containing the values to copy. The memory
870874
/// region underlying `source` must be initialized. The memory regions
871875
/// referenced by `source` and this buffer may overlap.
872-
/// - Returns: An index to the next uninitialized element in the buffer,
873-
/// or `endIndex`.
876+
/// - Returns: The index one past the last element of the buffer initialized
877+
/// by this function.
874878
@inlinable
875879
@_alwaysEmitIntoClient
876880
public func moveInitialize(fromContentsOf source: Self) -> Index {
@@ -909,8 +913,8 @@ extension Unsafe${Mutable}BufferPointer {
909913
/// - Parameter source: A buffer containing the values to copy. The memory
910914
/// region underlying `source` must be initialized. The memory regions
911915
/// referenced by `source` and this buffer may overlap.
912-
/// - Returns: An index to the next uninitialized element in the buffer,
913-
/// or `endIndex`.
916+
/// - Returns: The index one past the last element of the buffer initialized
917+
/// by this function.
914918
@inlinable
915919
@_alwaysEmitIntoClient
916920
public func moveInitialize(fromContentsOf source: Slice<Self>) -> Index {
@@ -1091,7 +1095,7 @@ extension Unsafe${Mutable}BufferPointer {
10911095
/// or a whole fraction of `Element`'s stride.
10921096
/// To bind a region of memory to a type that does not match these
10931097
/// requirements, convert the buffer to a raw buffer and use the
1094-
/// `bindMemory(to:)` method.
1098+
/// raw buffer's `withMemoryRebound(to:)` method.
10951099
/// If `T` and `Element` have different alignments, this buffer's
10961100
/// `baseAddress` must be aligned with the larger of the two alignments.
10971101
///

0 commit comments

Comments
 (0)