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

Revert "feat(shuttle-axum) Make AxumService generic to be able to use axum::State with it (#924)" #1199

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

jonaro00
Copy link
Member

@jonaro00 jonaro00 commented Sep 5, 2023

This reverts commit e6ade25.

Description of change

An axum router with <S != ()> cannot be turned into a service. IT is only implemented for <S = ()> https://docs.rs/axum/latest/axum/struct.Router.html#impl-Router%3C(),+B%3E
The generic <S> means which state the router is missing. https://docs.rs/axum/latest/axum/routing/struct.Router.html#what-s-in-routers-means

How has this been tested? (if applicable)

The example that was created for "verifying" #924, shuttle-hq/shuttle-examples#52, did not verify the functionality of the generic (it's a good example tho). If you try setting S to anything, your code will now compile.
Basically, #924 was never fully tested.

@jonaro00
Copy link
Member Author

jonaro00 commented Sep 5, 2023

@morlinbrot I'm curios what you think. Am I right or wrong?

@chesedo chesedo merged commit fa86d5b into shuttle-hq:main Sep 8, 2023
@jonaro00 jonaro00 deleted the revert-axum-generic branch September 8, 2023 10:04
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.

4 participants