-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
A-axumC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.E-easyCall for participation: Experience needed to fix: Easy / not muchCall for participation: Experience needed to fix: Easy / not muchE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.
Description
- I have looked for existing issues (including closed) about this
Feature Request
Consider adding impl TryFrom<&Uri> for axum::extract::Query
Motivation
I was porting a project from rocket and axum and accidentally regressed some endpoints from differences in query parsing. It would have been nice to have a simple way to test the query parsing in isolation, but the simplest solution I could come up with was to just copy the internals of Query's FromRequestParts
Proposal
Move the logic from Query's FromRequestParts implementation into TryFrom<&Uri> for Query and call Query::try_from(&parts.uri) in from_request_parts()
Only drawback I can think of is that this adds some slight noise to the API
Alternatives
None that seem compelling
Metadata
Metadata
Assignees
Labels
A-axumC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.E-easyCall for participation: Experience needed to fix: Easy / not muchCall for participation: Experience needed to fix: Easy / not muchE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.