-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove B
type param: the rest
#1778
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
Conversation
let service = tower::ServiceExt::<Request<Body>>::map_err( | ||
handle_404.into_service(), | ||
|err| -> std::io::Error { match err {} }, | ||
); |
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.
Hm having to specificy the types like this is pretty unfortunate 😕 but otherwise we get inference errors.
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.
Feels like between this and the middleware-state thing, tower not receiving nearly as much attention as axum is becoming a problem...
S: Send + Sync, | ||
{ | ||
type Rejection = (); | ||
|
||
async fn from_request(_req: Request<B>, _state: &S) -> Result<Self, Self::Rejection> { | ||
async fn from_request(_req: Request<axum::body::Body>, _state: &S) -> Result<Self, Self::Rejection> { |
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.
No alias yet in this PR? :)
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.
Not yet. That comes in #1789
let service = tower::ServiceExt::<Request<Body>>::map_err( | ||
handle_404.into_service(), | ||
|err| -> std::io::Error { match err {} }, | ||
); |
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.
Feels like between this and the middleware-state thing, tower not receiving nearly as much attention as axum is becoming a problem...
It should all compile now 🤞