diff --git a/crates/ide_assists/src/handlers/merge_match_arms.rs b/crates/ide_assists/src/handlers/merge_match_arms.rs index de796bcc38..b61edc8964 100644 --- a/crates/ide_assists/src/handlers/merge_match_arms.rs +++ b/crates/ide_assists/src/handlers/merge_match_arms.rs @@ -113,14 +113,9 @@ fn are_same_types( fn get_arm_types(ctx: &AssistContext, arm: &ast::MatchArm) -> Vec> { match arm.pat() { - Some(ast::Pat::TupleStructPat(tp)) => tp - .fields() - .into_iter() - .map(|field| { - let pat_type = ctx.sema.type_of_pat(&field); - pat_type - }) - .collect_vec(), + Some(ast::Pat::TupleStructPat(tp)) => { + tp.fields().into_iter().map(|field| ctx.sema.type_of_pat(&field)).collect_vec() + } _ => Vec::new(), } }