From 2f7e1b76319ead455048627737972c015d8d3908 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 6 Apr 2023 05:38:15 +0000 Subject: refactor(router): no need for pin --- src/router.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/router.rs b/src/router.rs index 940bda0..f0ba97e 100644 --- a/src/router.rs +++ b/src/router.rs @@ -165,9 +165,7 @@ impl Router { .insert( route.into(), Arc::new(AsyncMutex::new(Box::new( - move |context: RouteContext<'_>| { - Box::pin(handler(context).into_future()) - }, + move |context: RouteContext<'_>| handler(context).into_future(), ))), ) .unwrap(); -- cgit v1.2.3