-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
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.
awesome, this is long overdue,
I kinda benched this because couldn't figure out how to make it compile again hehe
thanks
crates/anvil/server/src/handler.rs
Outdated
/// 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. |
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.
ah I remember struggling to make this work
very nice
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.
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
28e14c6
to
f8f5977
Compare
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.
gg ^^
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
toState
.cc @mattsse