From 2f18abb7fafd7d1a9d217526053d35c230129cef Mon Sep 17 00:00:00 2001 From: Horu <73709188+HigherOrderLogic@users.noreply.github.com> Date: Fri, 11 Oct 2024 09:23:55 +1100 Subject: [PATCH] Update methods to create `FromFnLayer` (#2966) Co-authored-by: Jonas Platte --- axum/src/middleware/from_fn.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/axum/src/middleware/from_fn.rs b/axum/src/middleware/from_fn.rs index d0d5046c..b6e1357c 100644 --- a/axum/src/middleware/from_fn.rs +++ b/axum/src/middleware/from_fn.rs @@ -170,7 +170,7 @@ pub fn from_fn_with_state(state: S, f: F) -> FromFnLayer { /// /// [`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: F, @@ -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: F, inner: I,