Skip to content

Commit

Permalink
Improvement for #[tokio::main]
Browse files Browse the repository at this point in the history
  • Loading branch information
Jedsek committed Jun 14, 2024
1 parent c17e8d5 commit 13325e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tokio-macros/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,12 @@ fn parse_knobs(mut input: ItemFn, is_test: bool, config: FinalConfig) -> TokenSt
};

let input = input.into_tokens(generated_attrs, body, last_block);
replace_with_prefix(input)

if is_test {
input
} else {
replace_with_prefix(input)
}
}

fn replace_with_prefix(input: TokenStream) -> TokenStream {
Expand Down

0 comments on commit 13325e7

Please sign in to comment.