mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
Motivation: The bytes that a Unsafe(Mutable)RawBufferPointers points to can be accessed directly as `UInt8`s. We didn't know that so we bind `ByteBuffer`s memory to `UInt8` so that we can access it as `UnsafePointer<UInt8>` using `assumingMemoryBound(to: UInt8.self)` in many places. Most of the time that is unnecessarily awkward and unnecessary. Modifications: - remove some easy instances where we access an `UnsafeMutableBufferPointer` as `UnsafeBufferPointer<UInt8>` just to read some `UInt8`s. Result: less awkward looking code