Skip to content

Add OptionalPath extractor#1889

Merged
davidpdrsn merged 4 commits intomainfrom
jplatte/optional-path
Apr 9, 2023
Merged

Add OptionalPath extractor#1889
davidpdrsn merged 4 commits intomainfrom
jplatte/optional-path

Conversation

@jplatte
Copy link
Copy Markdown
Contributor

@jplatte jplatte commented Mar 27, 2023

Motivation

Resolves #1884.

Solution

What was already written on the issue 😄

I also had to add kind() to FailedToDeserializePathParams. I don't think we should really have both kind() and into_kind() but I wasn't too sure what it should look like and went for roughly the path of least resistance (it would have been easier to return &ErrorKind but I'm guessing we don't want to guarantee that the rejection holds an ErrorKind).

@jplatte jplatte requested a review from davidpdrsn March 27, 2023 17:03
Comment thread axum-extra/Cargo.toml
@jplatte jplatte force-pushed the jplatte/optional-path branch from e040c06 to fe689be Compare March 27, 2023 18:09
Comment thread axum/src/extract/path/mod.rs Outdated
@jplatte jplatte force-pushed the jplatte/optional-path branch from fe689be to 1885dd4 Compare April 7, 2023 19:31
Copy link
Copy Markdown
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.

Changelog?

Comment thread axum-extra/src/extract/optional_path.rs Outdated
@davidpdrsn
Copy link
Copy Markdown
Member

I'll do the last view changes now.

@davidpdrsn davidpdrsn enabled auto-merge (squash) April 9, 2023 12:07
@davidpdrsn davidpdrsn merged commit 43b2d52 into main Apr 9, 2023
@davidpdrsn davidpdrsn deleted the jplatte/optional-path branch April 9, 2023 12:23
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.

OptionalPath extractor

2 participants