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

feat(client): impl tower_service::Service for &Client #2089

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

tesaguri
Copy link
Contributor

There's a blanket implementation of tower_service::Service for &mut S but not for &S. Since hyper::Client::request takes &self only, &Client can implement Service, allowing users to take advantage of Tower's abstraction without additional ownership restrictions.

@tesaguri tesaguri force-pushed the service-for-client-ref branch from 8c223f4 to 87f6876 Compare June 25, 2020 14:34
@tesaguri
Copy link
Contributor Author

Rebased and fixed the build.

@seanmonstar seanmonstar merged commit 77c3b5b into hyperium:master Jun 25, 2020
@seanmonstar
Copy link
Member

Thank you! Sorry for forgetting about this one.

@tesaguri tesaguri deleted the service-for-client-ref branch June 25, 2020 15:40
BenxiangGe pushed a commit to BenxiangGe/hyper that referenced this pull request Jul 26, 2021
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.

3 participants