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

Add to_http method for Status #376

Merged
merged 1 commit into from
Jun 25, 2020
Merged

Add to_http method for Status #376

merged 1 commit into from
Jun 25, 2020

Conversation

belak
Copy link
Contributor

@belak belak commented Jun 19, 2020

Motivation

In experimenting for #375, I noticed that there's not a convenient way for converting a Status into an http::Response for use in tower Services. This moves the private implementation to Status::to_http as originally discussed in Discord.

Solution

For the most part server::Grpc::map_status was just renamed to Status::to_http. Almost no code was changed.

@belak belak mentioned this pull request Jun 19, 2020
Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

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

LGTM!

@LucioFranco LucioFranco merged commit 327b4ff into hyperium:master Jun 25, 2020
@belak belak deleted the status-into-http branch July 6, 2020 21:28
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