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

Remove RequestParts::take_extensions #699

Merged
merged 8 commits into from
Jan 13, 2022
Merged

Conversation

davidpdrsn
Copy link
Member

@davidpdrsn davidpdrsn commented Jan 11, 2022

Same story as #698 but this time for extensions.

Removes RequestParts::take_extensions and impl FromRequest for Extensions meaning Extensions is no longer an extractor. Been thinking before that it probably didn't have much utility in the first place since all you can do is get types, which extract::Extension can also do. Users can still use RequestParts::extensions_mut however to std::mem::take them if they really need to.

TODO

  • Changelog

axum-core/src/extract/mod.rs Outdated Show resolved Hide resolved
axum-core/src/macros.rs Show resolved Hide resolved
davidpdrsn and others added 2 commits January 11, 2022 21:50
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
@davidpdrsn davidpdrsn merged commit 9f5dc45 into axum-next Jan 13, 2022
@davidpdrsn davidpdrsn deleted the remove-take-extensions branch January 13, 2022 08:49
davidpdrsn added a commit that referenced this pull request Jan 23, 2022
* Remove `RequestParts::take_extensions`

* fix out of date docs

* Remove RequestAlreadyExtracted and replace it with BodyAlreadyExtracted

* fix docs

* fix test

* Update axum-core/src/extract/mod.rs

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>

* Remove macro only used once

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
davidpdrsn added a commit that referenced this pull request Jan 23, 2022
* Remove `RequestParts::take_extensions`

* fix out of date docs

* Remove RequestAlreadyExtracted and replace it with BodyAlreadyExtracted

* fix docs

* fix test

* Update axum-core/src/extract/mod.rs

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>

* Remove macro only used once

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants