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

Improve documentation of Path #2314

Merged
merged 3 commits into from
Nov 18, 2023
Merged

Improve documentation of Path #2314

merged 3 commits into from
Nov 18, 2023

Conversation

uckelman
Copy link
Contributor

@uckelman uckelman commented Nov 13, 2023

Motivation

This improves the documentation for Path by specifically calling out that one Path extractor captures all components for a route. New users fall into the trap of thinking that each capture needs its own Path argument., which does not work.

See #2313 for more details.

Solution

This PR adds two sentences to the docs to clarify that only one Path should be used.

Fixes #2313

@davidpdrsn davidpdrsn changed the title Improve documentation of axum::extract::Path (#2313) Improve documentation of Path Nov 14, 2023
Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidpdrsn davidpdrsn enabled auto-merge (squash) November 14, 2023 07:48
@davidpdrsn davidpdrsn merged commit 6e984b7 into tokio-rs:main Nov 18, 2023
18 checks passed
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.

Path extractor documentation does not mention that multiple Path arguments should not be used
2 participants