Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(http/retry): use Poll::{map_ok, map_err} #3586

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

cratelyn
Copy link
Collaborator

this commit makes some small, admittedly subjective tweaks to ReplayBody::poll_trailers(..).

we can make use of the map_ok and map_err methods that exist to map Poll::Ready<Result<T, E>>'s inner T to some U (in our case, to record the trailers for later replay), and to map the error type into a boxed Error.

this is a minor tweak, front-running other work to port the ReplayBody<B> to http-body 1.0. see linkerd/linkerd2#8733.

@cratelyn cratelyn force-pushed the kate/http-retry.clean-up-trailer-polling branch from 6df5d85 to 740ef5e Compare February 4, 2025 16:42
@cratelyn cratelyn force-pushed the kate/http-retry.clean-up-trailer-polling branch from 740ef5e to 2c72348 Compare February 4, 2025 16:47
@cratelyn cratelyn enabled auto-merge (squash) February 4, 2025 16:51
@cratelyn cratelyn merged commit 7eecfb4 into main Feb 4, 2025
15 checks passed
@cratelyn cratelyn deleted the kate/http-retry.clean-up-trailer-polling branch February 4, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants