mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Auto merge of #13860 - danieleades:clippy, r=lnicola
fix a bunch of clippy lints fixes a bunch of clippy lints for fun and profit i'm aware of this repo's position on clippy. The changes are split into separate commits so they can be reviewed separately
This commit is contained in:
commit
f77b68a3cb
120 changed files with 298 additions and 375 deletions
|
@ -452,7 +452,7 @@ pub fn parse_tt_as_comma_sep_paths(input: ast::TokenTree) -> Option<Vec<ast::Pat
|
|||
let input_expressions = tokens.group_by(|tok| tok.kind() == T![,]);
|
||||
let paths = 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("")).and_then(|expr| match expr {
|
||||
ast::Expr::PathExpr(it) => it.path(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue