Skip to content

Commit

Permalink
macros: fix the clippy::needless_return lint triggered by `#[tokio::t…
Browse files Browse the repository at this point in the history
…est]` and `#[tokio::main]`
  • Loading branch information
Veetaha committed Sep 29, 2024
1 parent 8751010 commit 24fadad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tokio-macros/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,11 @@ fn parse_knobs(mut input: syn::ItemFn, is_test: bool, config: FinalConfig) -> To
let brace_token = input.block.brace_token;
let body_ident = quote! { body };
let block_expr = quote_spanned! {last_stmt_end_span=>
#[allow(clippy::expect_used, clippy::diverging_sub_expression)]
#[allow(
clippy::expect_used,
clippy::diverging_sub_expression,
clippy::needless_return,
)]
{
return #rt
.enable_all()
Expand Down

0 comments on commit 24fadad

Please sign in to comment.