mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-24 17:16:25 +00:00
minor: New clippy lints
This commit is contained in:
parent
6725e046df
commit
4b6007115a
92 changed files with 180 additions and 201 deletions
|
|
@ -819,7 +819,7 @@ pub fn match_arm_with_guard(
|
|||
|
||||
pub fn match_arm_list(arms: impl IntoIterator<Item = ast::MatchArm>) -> ast::MatchArmList {
|
||||
let arms_str = arms.into_iter().fold(String::new(), |mut acc, arm| {
|
||||
let needs_comma = arm.expr().map_or(true, |it| !it.is_block_like());
|
||||
let needs_comma = arm.expr().is_none_or(|it| !it.is_block_like());
|
||||
let comma = if needs_comma { "," } else { "" };
|
||||
let arm = arm.syntax();
|
||||
format_to_acc!(acc, " {arm}{comma}\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue