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

chore(transport): Use hyper_util::service::TowerToHyperService #1729

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

tottoto
Copy link
Collaborator

@tottoto tottoto commented Jun 14, 2024

Uses hyper_util::service::TowerToHyperService instead of defining the own version with change.

Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@@ -595,7 +598,9 @@ impl<L> Server<L> {
let req_svc = svc
.call(&io)
.await
.map_err(super::Error::from_source)?;
.map_err(super::Error::from_source)?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: how do you feel about using an explicit match here? I generally feel like map().map_err() doesn't give as much clarity.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel the style using method chain like this to be a bit more intuitive.

@djc djc added this pull request to the merge queue Jun 15, 2024
Merged via the queue into hyperium:master with commit 53cbd0e Jun 15, 2024
16 checks passed
@tottoto tottoto deleted the remove-tower-to-hyper-service branch June 15, 2024 09: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