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

chore(deps): bump axum to 0.6 #6321

Merged
merged 1 commit into from
Nov 15, 2023
Merged

chore(deps): bump axum to 0.6 #6321

merged 1 commit into from
Nov 15, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Nov 15, 2023

And fdlimit

The only breaking change is that only one extractor can consume the response body, so the handler has to come before the response in the HTTP handler function.

Additionally, the Axum changelog recommends changing Extension to State.

cc @mattsse

@DaniPopes DaniPopes changed the title chore(deps): bump hyper to 0.6 chore(deps): bump axum to 0.6 Nov 15, 2023
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

awesome, this is long overdue,
I kinda benched this because couldn't figure out how to make it compile again hehe

thanks

/// Handles incoming JSON-RPC Request
pub async fn handle<Handler: RpcHandler>(
/// Handles incoming JSON-RPC Request.
// NOTE: `State` must come first because the `request` extractor consumes the request body.
Copy link
Member

Choose a reason for hiding this comment

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

ah I remember struggling to make this work
very nice

Copy link
Member Author

@DaniPopes DaniPopes Nov 15, 2023

Choose a reason for hiding this comment

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

Yeah it took me an hour to figure it out :D
That is literally the only thing that stopped it from compiling, the error being as generic as possible (fn(..)->.. doesn't implement Handler) and the debug_handler macro not working with generics didn't help

Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

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

gg ^^

@DaniPopes DaniPopes merged commit 8c11482 into master Nov 15, 2023
20 checks passed
@DaniPopes DaniPopes deleted the dani/bump-hyper branch November 15, 2023 21:49
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.

3 participants