diff options
Diffstat (limited to 'src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute.rs')
-rw-r--r-- | src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute.rs b/src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute.rs index d9fe94cb4..bb950c76f 100644 --- a/src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute.rs +++ b/src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute.rs @@ -357,7 +357,7 @@ fn parse_comma_sep_expr(input: ast::TokenTree) -> Option<Vec<ast::Expr>> { Some( input_expressions .into_iter() - .filter_map(|(is_sep, group)| (!is_sep).then(|| group)) + .filter_map(|(is_sep, group)| (!is_sep).then_some(group)) .filter_map(|mut tokens| syntax::hacks::parse_expr_from_str(&tokens.join(""))) .collect::<Vec<ast::Expr>>(), ) @@ -371,9 +371,7 @@ fn attributes_are_sorted() { attrs.for_each(|next| { assert!( prev < next, - r#"ATTRIBUTES array is not sorted, "{}" should come after "{}""#, - prev, - next + r#"ATTRIBUTES array is not sorted, "{prev}" should come after "{next}""# ); prev = next; }); |