Skip to content

Commit

Permalink
Update methods to create FromFnLayer (#2966)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Platte <[email protected]>
  • Loading branch information
HigherOrderLogic and jplatte authored Oct 10, 2024
1 parent af95794 commit 2f18abb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions axum/src/middleware/from_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub fn from_fn_with_state<F, S, T>(state: S, f: F) -> FromFnLayer<F, S, T> {
///
/// [`tower::Layer`] is used to apply middleware to [`Router`](crate::Router)'s.
///
/// Created with [`from_fn`]. See that function for more details.
/// Created with [`from_fn`] or [`from_fn_with_state`]. See those functions for more details.
#[must_use]
pub struct FromFnLayer<F, S, T> {
f: F,
Expand Down Expand Up @@ -224,7 +224,7 @@ where

/// A middleware created from an async function.
///
/// Created with [`from_fn`]. See that function for more details.
/// Created with [`from_fn`] or [`from_fn_with_state`]. See those functions for more details.
pub struct FromFn<F, S, I, T> {
f: F,
inner: I,
Expand Down

0 comments on commit 2f18abb

Please sign in to comment.