-
Notifications
You must be signed in to change notification settings - Fork 286
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 MakeService::into_service
and MakeService::as_service
#492
Conversation
One thought I had was that it would be nice if |
Co-authored-by: Eliza Weisman <[email protected]>
Should we expose them as |
as long as they live in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, this looks good to me! thanks!
tower/src/make/make_service.rs
Outdated
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { | ||
self.make.poll_ready(cx) | ||
} | ||
|
||
fn call(&mut self, target: Target) -> Self::Future { | ||
self.make.make_service(target) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIOLI: these could probably be inlined...compiler might be smart enough to figure that out now though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6a753cc 👍
I was thinking if we wanted to make the types public since the |
Hmm...let's just make the |
👌 |
Co-authored-by: Eliza Weisman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
Resolves #253
Adds
MakeService::into_service
andMakeService::as_service
which convertsMakeService
s intoService
s.into_service
consumesself
andas_service
borrowsself
mutably.