Skip to content

Commit 2f18abb

Browse files
Update methods to create FromFnLayer (#2966)
Co-authored-by: Jonas Platte <[email protected]>
1 parent af95794 commit 2f18abb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

axum/src/middleware/from_fn.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ pub fn from_fn_with_state<F, S, T>(state: S, f: F) -> FromFnLayer<F, S, T> {
170170
///
171171
/// [`tower::Layer`] is used to apply middleware to [`Router`](crate::Router)'s.
172172
///
173-
/// Created with [`from_fn`]. See that function for more details.
173+
/// Created with [`from_fn`] or [`from_fn_with_state`]. See those functions for more details.
174174
#[must_use]
175175
pub struct FromFnLayer<F, S, T> {
176176
f: F,
@@ -224,7 +224,7 @@ where
224224

225225
/// A middleware created from an async function.
226226
///
227-
/// Created with [`from_fn`]. See that function for more details.
227+
/// Created with [`from_fn`] or [`from_fn_with_state`]. See those functions for more details.
228228
pub struct FromFn<F, S, I, T> {
229229
f: F,
230230
inner: I,

0 commit comments

Comments
 (0)