Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove B type param: Router, MethodRouter, Handler #1774

Merged
merged 2 commits into from
Feb 21, 2023

Conversation

davidpdrsn
Copy link
Member

These are the interesting parts of axum. The rest is fairly trivial so I'll do a separate PR for those.

These are the interesting parts of axum. The rest is fairly trivial so
I'll do a separate PR for those.
Comment on lines +310 to +314
L: Layer<Route> + Clone + Send + 'static,
L::Service: Service<Request<Body>> + Clone + Send + 'static,
<L::Service as Service<Request<Body>>>::Response: IntoResponse + 'static,
<L::Service as Service<Request<Body>>>::Error: Into<Infallible> + 'static,
<L::Service as Service<Request<Body>>>::Future: Send + 'static,
Copy link
Member Author

@davidpdrsn davidpdrsn Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was initially a little worried that requiring L::Service: Service<Request<Body>> wouldn't work for RequestBodyLimit but it still implements Service<Request<B>> which matches Service<Request<Body>> so its all fine.

@davidpdrsn davidpdrsn requested a review from jplatte February 20, 2023 22:06
axum/src/routing/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
@davidpdrsn davidpdrsn merged commit 69e8b04 into remove-generic-b-type-prep Feb 21, 2023
@davidpdrsn davidpdrsn deleted the remove-generic-b-type-axum-1 branch February 21, 2023 08:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants