Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(http/retry): defer construction of
PeekTrailersBody<B>
this commit refactors the polling logic in `PeekTrailersBody<B>::read_response`. this commit makes some subtle changes with the migration to hyper 1.0 in mind, to make this function more easily portable to the new signature of `http_body::Body`. see linkerd/linkerd2#8733 for more information. this commit defers the `Self` construction of the `PeekTrailersBody` body. this means that the control flow does not need to reach through to e.g. `body.inner` to poll the inner body being peeked. additionally, it provides us with `let` bindings for the first data frame yielded, and the trailers frame yielded thereafter. this is largely cosmetic, but will make it easier to deal with the additional matching we'll need to do when there is a single polling function that yields us `Frame<D>` objects. Signed-off-by: katelyn martin <kate@buoyant.io>
- Loading branch information