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 |
davidpdrsn
left a comment
There was a problem hiding this comment.
Yes! I've also thought that ready_and was an awkward name.
Done! I've also opened #568 as a reminder. |
hawkw
left a comment
There was a problem hiding this comment.
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]>
hawkw
left a comment
There was a problem hiding this comment.
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_andtoServiceExt::readyReadyAndfuture toReadyServiceExt::readyandReadyAnd.My recollection of the original conversation surrounding the introduction of the
ServiceExt::ready_andcombinator in #427 was that it was meant to be a temporary workaround for the unchainableServiceExt::readycombinator until the next breaking release of the Tower crate. The unchainableServiceExt::readycombinator was removed, butServiceExt::ready_andwas 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::readyand deprecateServiceExt::ready_and.