hyper
hyper copied to clipboard
Replace transmute with bounded manual `Send` impl
Requires https://github.com/hyperium/h2/pull/614 before this will compile.
We can avoid a transmute and some questionable code by using a specially-crafted conditional Send
impl. Sendable
and the impl are inside a const _: () = { ... }
block to prevent the otherwise unsound Sendable
type from being visible to the rest of the crate.
I believe that both versions are equally sound, but this helps prevent future issues and makes auditing the code more straightforward.