Skip to content

Commit

Permalink
Issues-2734 - Fix comment on shrink buffer function
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ahsan-ali committed Jul 27, 2024
1 parent 45f6b06 commit a48b322
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/NIOCore/ByteBuffer-core.swift
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,9 @@ public struct ByteBuffer {
return true
}

/// Shrinks the buffers capacity to a `desiredCapacity` without altering readably bytes.
/// The `ByteBuffer` will successfully be shrunk if the requested capacity is less than the current capacity,
/// and the requested capacity is more than the number of readable bytes in the buffer.
/// If either condition is not true, the buffer will not be shrunk.
///
/// - Parameter desiredCapacity: The desired capacity for the buffers capacity to be shrunken to
/// - Returns: Bool indicating whether the buffer capacity has been shrunk to the desiredCapacity.
Expand Down

0 comments on commit a48b322

Please sign in to comment.