Skip to content

Commit

Permalink
attributes: extract match scrutinee (#2880)
Browse files Browse the repository at this point in the history
On clippy version 1.76.0 this gives a warning, extracting the
scrutinee to a variable fixes this.

Fixes: #2876
  • Loading branch information
kaffarell committed Mar 12, 2024
1 parent 571c530 commit 36bf063
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tracing-attributes/src/expand.rs
Expand Up @@ -277,7 +277,8 @@ fn gen_block<B: ToTokens>(
let mk_fut = match (err_event, ret_event) {
(Some(err_event), Some(ret_event)) => quote_spanned!(block.span()=>
async move {
match async move #block.await {
let __match_scrutinee = async move #block.await;
match __match_scrutinee {
#[allow(clippy::unit_arg)]
Ok(x) => {
#ret_event;
Expand Down

0 comments on commit 36bf063

Please sign in to comment.