You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this applies a review suggestion here:
https://github.com/hyperium/http-body/pull/100/files#r1399781061
this commit refactors the channel-backed body in hyperium#100, changing the
`mpsc::Receiver<E>` used to transmit an error into a
`oneshot::Receiver<E>`.
this should improve memory usage, and make the channel a smaller
structure.
in order to achieve this, some minor adjustments are made:
* use pin projection, projecting pinnedness to the oneshot receiver,
polling it via `core::future::Future::poll(..)` to yield a body frame.
* add `Debug` bounds were needed.
as an alternative, see tokio-rs/tokio#7059, which proposed a
`poll_recv(..)` inherent method for a oneshot channel receiver.
0 commit comments