From ca24460fac17536fc4a5ef1fbc4f43ee5f401421 Mon Sep 17 00:00:00 2001 From: Yann Simon Date: Thu, 4 Dec 2025 13:47:30 +0100 Subject: [PATCH] move imports under the feature (#3578) --- axum-extra/src/routing/typed.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/axum-extra/src/routing/typed.rs b/axum-extra/src/routing/typed.rs index 06652092..c0659c03 100644 --- a/axum-extra/src/routing/typed.rs +++ b/axum-extra/src/routing/typed.rs @@ -384,12 +384,7 @@ impl_second_element_is!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, #[cfg(test)] mod tests { - use crate::routing::{RouterExt, TypedPath}; - use axum::{ - extract::rejection::PathRejection, - response::{IntoResponse, Response}, - Router, - }; + use crate::routing::TypedPath; use serde::{Deserialize, Serialize}; #[derive(TypedPath, Deserialize)] @@ -441,6 +436,12 @@ mod tests { #[cfg(feature = "with-rejection")] #[allow(dead_code)] // just needs to compile fn supports_with_rejection() { + use crate::routing::RouterExt; + use axum::{ + extract::rejection::PathRejection, + response::{IntoResponse, Response}, + Router, + }; async fn handler(_: crate::extract::WithRejection) {} struct MyRejection {}