mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-25 11:17:13 +00:00
Merge pull request #20122 from chenyukang/yukang-fix-remove-parens
Remove unnecessary parens in closure
This commit is contained in:
commit
6df12139bc
@ -195,5 +195,5 @@ fn comma_wrapper(ctx: &CompletionContext<'_>) -> Option<(impl Fn(&str) -> String
|
||||
matches!(prev_token_kind, SyntaxKind::COMMA | SyntaxKind::L_PAREN | SyntaxKind::PIPE);
|
||||
let leading = if has_leading_comma { "" } else { ", " };
|
||||
|
||||
Some((move |label: &_| (format!("{leading}{label}{trailing}")), param.text_range()))
|
||||
Some((move |label: &_| format!("{leading}{label}{trailing}"), param.text_range()))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user