From 912ac5423fd5739b8ccdc00c8514f75eab2b804a Mon Sep 17 00:00:00 2001 From: Fangdun Tsai Date: Mon, 1 Jan 2024 17:23:12 +0800 Subject: [PATCH] chore(core): remove async-trait on FnExt trait --- viz-core/src/handler/fn_ext.rs | 3 +-- viz-core/src/macros.rs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/viz-core/src/handler/fn_ext.rs b/viz-core/src/handler/fn_ext.rs index a69022dc..30adb192 100644 --- a/viz-core/src/handler/fn_ext.rs +++ b/viz-core/src/handler/fn_ext.rs @@ -1,9 +1,8 @@ /// A handler with extractors. -#[crate::async_trait] pub trait FnExt: Send + Sync + 'static { /// The returned type after the call operator is used. type Output; /// Performs the call operation. - async fn call(&self, i: I) -> Self::Output; + fn call(&self, i: I) -> impl crate::Future + Send; } diff --git a/viz-core/src/macros.rs b/viz-core/src/macros.rs index 8ca47861..9c68806d 100644 --- a/viz-core/src/macros.rs +++ b/viz-core/src/macros.rs @@ -21,7 +21,6 @@ macro_rules! tuple_impls { } } - #[crate::async_trait] impl<$($T,)* Fun, Fut, Out> FnExt for Fun where $($T: FromRequest + Send,)*