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

Remove B type param: the rest #1778

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

davidpdrsn
Copy link
Member

It should all compile now 🤞

let service = tower::ServiceExt::<Request<Body>>::map_err(
handle_404.into_service(),
|err| -> std::io::Error { match err {} },
);
Copy link
Member Author

@davidpdrsn davidpdrsn Feb 21, 2023

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.

Copy link
Member

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> {
Copy link
Member

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? :)

Copy link
Member Author

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 {} },
);
Copy link
Member

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...

@davidpdrsn davidpdrsn merged commit b9e0c0c into remove-generic-b-type-prep Feb 28, 2023
@davidpdrsn davidpdrsn deleted the remove-generic-b-type branch February 28, 2023 23:32
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