From d4c46b7da9db2c14670ce65d5804ed3012361928 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 9 Jan 2021 14:58:15 +0000 Subject: [PATCH] fix macros code --- actix-macros/src/lib.rs | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/actix-macros/src/lib.rs b/actix-macros/src/lib.rs index dd791578..60f177fa 100644 --- a/actix-macros/src/lib.rs +++ b/actix-macros/src/lib.rs @@ -36,25 +36,14 @@ pub fn main(_: TokenStream, item: TokenStream) -> TokenStream { sig.asyncness = None; - if cfg!(feature = "actix-reexport") { - (quote! { - #(#attrs)* - #vis #sig { - actix::System::new(stringify!(#name)) - .block_on(async move { #body }) - } - }) - .into() - } else { - (quote! { - #(#attrs)* - #vis #sig { - actix_rt::System::new(stringify!(#name)) - .block_on(async move { #body }) - } - }) - .into() - } + (quote! { + #(#attrs)* + #vis #sig { + actix_rt::System::new(stringify!(#name)) + .block_on(async move { #body }) + } + }) + .into() } /// Marks async test function to be executed by actix runtime.