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

Optional extractors #685

Merged
merged 2 commits into from
Jan 3, 2022
Merged

Optional extractors #685

merged 2 commits into from
Jan 3, 2022

Conversation

jplatte
Copy link
Member

@jplatte jplatte commented Jan 3, 2022

Motivation & Solution

See commit message.

Side note

Explicit doc(cfg)s aren't really needed anymore, we might want to switch to use doc_auto_cfg for most things.

… they add some runtime cost to handling any request that goes through
a Router, which only makes sense if they actually get used.

Enable both features by default for convenience.
@jplatte jplatte merged commit 83b03d0 into axum-next Jan 3, 2022
@jplatte jplatte deleted the optional-extractor-extensions branch January 3, 2022 15:28
@jplatte jplatte changed the title Optional extractor extensions Optional extractors Jan 3, 2022
davidpdrsn pushed a commit that referenced this pull request Jan 3, 2022
* Fix inconsistent indentation in axum/Cargo.toml

* Make MatchedPath and OriginalUri extractors and logic for them optional

… they add some runtime cost to handling any request that goes through
a Router, which only makes sense if they actually get used.

Enable both features by default for convenience.
davidpdrsn pushed a commit that referenced this pull request Jan 3, 2022
* Fix inconsistent indentation in axum/Cargo.toml

* Make MatchedPath and OriginalUri extractors and logic for them optional

… they add some runtime cost to handling any request that goes through
a Router, which only makes sense if they actually get used.

Enable both features by default for convenience.
davidpdrsn pushed a commit that referenced this pull request Jan 23, 2022
* Fix inconsistent indentation in axum/Cargo.toml

* Make MatchedPath and OriginalUri extractors and logic for them optional

… they add some runtime cost to handling any request that goes through
a Router, which only makes sense if they actually get used.

Enable both features by default for convenience.
davidpdrsn pushed a commit that referenced this pull request Jan 23, 2022
* Fix inconsistent indentation in axum/Cargo.toml

* Make MatchedPath and OriginalUri extractors and logic for them optional

… they add some runtime cost to handling any request that goes through
a Router, which only makes sense if they actually get used.

Enable both features by default for convenience.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants