Skip to content

Commit

Permalink
attributes: extract match scrutinee
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: tokio-rs#2876
  • Loading branch information
kaffarell committed Feb 14, 2024
1 parent 0e4a4be commit 07129ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tracing-attributes/src/expand.rs
Original file line number Diff line number Diff line change
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 07129ee

Please sign in to comment.