From adf140b2af41953da392df8befb34e2f8ac2d82c Mon Sep 17 00:00:00 2001 From: Brad Dunbar Date: Mon, 17 Nov 2025 10:37:50 -0500 Subject: [PATCH] SecondElementIs: Correct a small inconsistency This trait checks for the second element of a tuple, but the second element of the tuple is the first argument to a handler because the first element is the type parameter `M` from `FromRequest`. --- axum-extra/src/routing/typed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axum-extra/src/routing/typed.rs b/axum-extra/src/routing/typed.rs index 909a041968..066520927e 100644 --- a/axum-extra/src/routing/typed.rs +++ b/axum-extra/src/routing/typed.rs @@ -320,7 +320,7 @@ where /// Utility trait used with [`RouterExt`] to ensure the second element of a tuple type is a /// given type. /// -/// If you see it in type errors it's most likely because the second argument to your handler doesn't +/// If you see it in type errors it's most likely because the first argument to your handler doesn't /// implement [`TypedPath`]. /// /// You normally shouldn't have to use this trait directly.