-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add OptionalQuery extractor #2310
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.
Some minor nit picks but otherwise looks good!
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.
Thanks!
Head branch was pushed to by a user without write access
@davidpdrsn, made clippy happy again, take a look, please |
Oh no, clippy is mad at axum-core now on 1.75.0-beta.1 |
I'll take a look later today! But you're also free to submit a separate PR to fix it. |
Motivation
Resolves #2309
Solution
from_request_parts
does an additional check if query parameters are supplied. If none are present theOptionalQuery(None)
is returned, otherwise it falls back to logic identical toaxum_extra::extract::Query
.