-
Notifications
You must be signed in to change notification settings - Fork 282
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
Rename ServiceExt::ready_and
to ServiceExt::ready
#567
Conversation
let's go ahead and do this, please — that way, we can land this now, and remove |
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.
Yes! I've also thought that ready_and
was an awkward name.
Done! I've also opened #568 as a reminder. |
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.
couple of nits --- can we fix the new warnings added in this PR? i think the other ones were already present, so we can fix those in a follow-up, but this adds new deprecation warnings due to internal use of deprecated APIs.
besides that, lgtm!
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 — thanks for fixing the internal deprecation warnings!
Deprecated - **util**: Deprecated `ServiceExt::ready_and` (renamed to `ServiceExt::ready`). ([#567]) - **util**: Deprecated `ReadyAnd` future (renamed to `Ready`). ([#567]) Added - **builder**: Add `ServiceBuilder::layer_fn` to add a layer built from a function. ([#560]) - **builder**: Add `ServiceBuilder::map_future` for transforming the futures produced by a service. ([#559]) - **builder**: Add `ServiceBuilder::service_fn` for applying `Layer`s to an async function using `util::service_fn`. ([#564]) - **util**: Add example for `service_fn`. ([#563]) - **util**: Add `BoxLayer` for creating boxed `Layer` trait objects. ([#569]) [#567]: #567 [#560]: #560 [#559]: #559 [#564]: #564 [#563]: #563 [#569]: #569
Deprecated - **util**: Deprecated `ServiceExt::ready_and` (renamed to `ServiceExt::ready`). ([#567]) - **util**: Deprecated `ReadyAnd` future (renamed to `Ready`). ([#567]) Added - **builder**: Add `ServiceBuilder::layer_fn` to add a layer built from a function. ([#560]) - **builder**: Add `ServiceBuilder::map_future` for transforming the futures produced by a service. ([#559]) - **builder**: Add `ServiceBuilder::service_fn` for applying `Layer`s to an async function using `util::service_fn`. ([#564]) - **util**: Add example for `service_fn`. ([#563]) - **util**: Add `BoxLayer` for creating boxed `Layer` trait objects. ([#569]) [#567]: #567 [#560]: #560 [#559]: #559 [#564]: #564 [#563]: #563 [#569]: #569
Deprecated - **util**: Deprecated `ServiceExt::ready_and` (renamed to `ServiceExt::ready`). ([#567]) - **util**: Deprecated `ReadyAnd` future (renamed to `Ready`). ([#567]) Added - **builder**: Add `ServiceBuilder::layer_fn` to add a layer built from a function. ([#560]) - **builder**: Add `ServiceBuilder::map_future` for transforming the futures produced by a service. ([#559]) - **builder**: Add `ServiceBuilder::service_fn` for applying `Layer`s to an async function using `util::service_fn`. ([#564]) - **util**: Add example for `service_fn`. ([#563]) - **util**: Add `BoxLayer` for creating boxed `Layer` trait objects. ([#569]) [#567]: #567 [#560]: #560 [#559]: #559 [#564]: #564 [#563]: #563 [#569]: #569 Signed-off-by: Eliza Weisman <[email protected]>
These was deprecated in #567. In 0.5, we can just remove them entirely.
These was deprecated in #567. In 0.5, we can just remove them entirely.
These were deprecated in #567. In 0.5, we can just remove them entirely. Closes #568 Signed-off-by: Eliza Weisman <[email protected]>
This PR renames:
ServiceExt::ready_and
toServiceExt::ready
ReadyAnd
future toReady
ServiceExt::ready
andReadyAnd
.My recollection of the original conversation surrounding the introduction of the
ServiceExt::ready_and
combinator in #427 was that it was meant to be a temporary workaround for the unchainableServiceExt::ready
combinator until the next breaking release of the Tower crate. The unchainableServiceExt::ready
combinator was removed, butServiceExt::ready_and
was not renamed. I believe, but am not 100% sure, that this was an oversight.I also recognize that this PR might have a large impact. To reduce the impact, I'd be happy to modify this PR to introduce
ServiceExt::ready
and deprecateServiceExt::ready_and
.