mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Motivation: As described in #537, ByteBuffer.changeCapacity is not a very good function. We want to replace it with a better one, more similar to reserveCapacity on the standard library data structures, and ideally substantially faster. Modifications: - Deprecated ByteBuffer.changeCapacity. - Added ByteBuffer.reserveCapacity. - Changed the implementation of changeCapacity to call reserveCapacity when we're increasing the capacity. Result: Better APIs, better performance in the legacy ones, everything is better.