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

add ServiceBuilder::boxed_clone_sync helper #804

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

jlizen
Copy link
Contributor

@jlizen jlizen commented Dec 19, 2024

As requested in: #777

Adding the ServiceBuilder::boxed_clone_sync() method to match boxed_clone and boxed().

Note that in this case, I used the named, BoxCloneSyncServiceLayer, rather than the layer fn returned by BoxedCloneSyncService::layer(). I don't really see a good reason to prefer the latter. I think the reason that other helpers use that, is historical (named layer didn't exist yet).

Probably we should migrate everything over, but that seems likely to be a breaking change so I held off. Glad to cut an issue on that if you concur.

The only testing was via a doctest. This matches the other helper.

@jlizen jlizen force-pushed the master branch 3 times, most recently from 8bd56ed to ac861f9 Compare December 19, 2024 01:41
@jlizen
Copy link
Contributor Author

jlizen commented Dec 20, 2024

This is a quickie if you have a minute @seanmonstar , you have context on this from #777

@seanmonstar seanmonstar merged commit 34a6951 into tower-rs:master Dec 20, 2024
14 checks passed
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.

2 participants