-
Notifications
You must be signed in to change notification settings - Fork 285
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
Update tower-balance to std::future #335
Conversation
@@ -88,7 +98,7 @@ where | |||
|
|||
impl<D, Req> Balance<D, Req> | |||
where | |||
D: Discover, | |||
D: Discover + Unpin, |
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.
This makes me really sad, but it is required since we need to call Discover::poll_discover
(which takes Pin<&mut Self>
) from Service::poll_ready
(which takes &mut Self
).
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.
See also #319
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.
Yeah, this is fine 👍 can we make sure we have docs on why this is required maybe, just point people to that issue and what they can do to get Unpin (aka box the discover)?
34ba7be
to
1b63bbf
Compare
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.
LGTM no blockers, left some comments inline
@@ -88,7 +98,7 @@ where | |||
|
|||
impl<D, Req> Balance<D, Req> | |||
where | |||
D: Discover, | |||
D: Discover + Unpin, |
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.
Yeah, this is fine 👍 can we make sure we have docs on why this is required maybe, just point people to that issue and what they can do to get Unpin (aka box the discover)?
Will rebase and mark as ready once #330 lands (which this depends on)
This also includes a small patch to
tower-discover
to delegate theDiscover
trait throughPin<D>
whereD::Target: Discover
(so we can use it through, say,Pin<Box<>>
), and a patch totower-load
to makeConstant: Debug
.