Skip to content

Commit 96bdafc

Browse files
authored
Fix incorrect documentation in Buffer.swift withUnsafeBytes method (#178)
1 parent 44be5d5 commit 96bdafc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Sources/Subprocess/Buffer.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,10 @@ extension AsyncBufferSequence.Buffer {
6767
extension AsyncBufferSequence.Buffer {
6868
/// Access the raw bytes stored in this buffer
6969
/// - Parameter body: A closure with an `UnsafeRawBufferPointer` parameter that
70-
/// points to the contiguous storage for the type. If no such storage exists,
71-
/// the method creates it. If body has a return value, this method also returns
72-
/// that value. The argument is valid only for the duration of the
73-
/// closure’s SequenceOutput.
74-
/// - Returns: The return value, if any, of the body closure parameter.
70+
/// points to the contiguous storage for the buffer. If no such storage exists,
71+
/// the method creates it. The argument is valid only for the duration of the
72+
/// closure's execution.
73+
/// - Returns: The return value of the body closure.
7574
public func withUnsafeBytes<ResultType>(
7675
_ body: (UnsafeRawBufferPointer) throws -> ResultType
7776
) rethrows -> ResultType {

0 commit comments

Comments
 (0)