mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-26 04:57:50 +00:00
Motivation: Using indirect cases makes unwrapping and rewrapping HTTP/2 frames more expensive than it needs to be. As FramePayload.Data is essentially always stuffed into a FramePayload enum, we may as well just class-back it and avoid the extra allocs. Modifications: Make FramePayload.Data class-backed Result: Fewer allocations in many use-cases