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

axum-extra: WithRejection #1262

Merged
merged 18 commits into from
Aug 17, 2022
Merged

axum-extra: WithRejection #1262

merged 18 commits into from
Aug 17, 2022

Conversation

Altair-Bueno
Copy link
Contributor

@Altair-Bueno Altair-Bueno commented Aug 15, 2022

Motivation

See #1116 (comment)

Solution

  • Implement WithRequest
  • Add with_request feature
  • Include tests
  • Add documentation
  • Include an example

Based on @jplatte's version (tokio-rs#1116 (comment)), with slight changes

- Using `From<E::Rejection>` to define the trait bound on a more concise way
- Renamed variables to something more meaningfull
@jplatte
Copy link
Member

jplatte commented Aug 15, 2022

Please remove the @ in front of my username in your commit message, it's generating extra notifications for me that I don't want.

axum-extra/Cargo.toml Outdated Show resolved Hide resolved
axum-extra/src/extract/with_rejection.rs Outdated Show resolved Hide resolved
@Altair-Bueno Altair-Bueno marked this pull request as ready for review August 15, 2022 18:27
axum-extra/src/extract/with_rejection.rs Show resolved Hide resolved
axum-extra/src/extract/with_rejection.rs Outdated Show resolved Hide resolved
axum-extra/src/extract/with_rejection.rs Outdated Show resolved Hide resolved
axum-extra/src/extract/with_rejection.rs Show resolved Hide resolved
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.

I think it looks good!

Wanna update the changelog as well?

@Altair-Bueno
Copy link
Contributor Author

Wanna update the changelog as well?

Sure, omw

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) August 17, 2022 07:51
@davidpdrsn davidpdrsn merged commit fb21561 into tokio-rs:main Aug 17, 2022
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.

3 participants