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

Move middleware::from_fn into axum #719

Merged
merged 5 commits into from
Jan 25, 2022
Merged

Conversation

davidpdrsn
Copy link
Member

I've been very happy with axum_extra::middleware::from_fn so for 0.5 I think we should move it into the main axum crate.

Also renamed the type from MiddlewareFn to FromFn to match std's std::iter::FromFn.

axum/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

Lgtm! I like that the type name now matches the name of the function you use to construct it.

@davidpdrsn davidpdrsn enabled auto-merge (rebase) January 25, 2022 09:09
auto-merge was automatically disabled January 25, 2022 09:13

Rebase failed

@davidpdrsn davidpdrsn merged commit 9004a14 into main Jan 25, 2022
@davidpdrsn davidpdrsn deleted the move-middleware-fn-into-axum branch January 25, 2022 09:19
davidpdrsn added a commit that referenced this pull request Feb 22, 2022
* Move `middleware::from_fn` into axum

* changelog

* fix feature

* Rephrase changelog a bit
davidpdrsn added a commit that referenced this pull request Feb 22, 2022
* Move `middleware::from_fn` into axum

* changelog

* fix feature

* Rephrase changelog a bit
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