Skip to content

Commit 36bf063

Browse files
authored
attributes: extract match scrutinee (#2880)
On clippy version 1.76.0 this gives a warning, extracting the scrutinee to a variable fixes this. Fixes: #2876
1 parent 571c530 commit 36bf063

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tracing-attributes/src/expand.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ fn gen_block<B: ToTokens>(
277277
let mk_fut = match (err_event, ret_event) {
278278
(Some(err_event), Some(ret_event)) => quote_spanned!(block.span()=>
279279
async move {
280-
match async move #block.await {
280+
let __match_scrutinee = async move #block.await;
281+
match __match_scrutinee {
281282
#[allow(clippy::unit_arg)]
282283
Ok(x) => {
283284
#ret_event;

0 commit comments

Comments
 (0)