mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Auto merge of #16398 - Urhengulas:satisfy-clippy, r=Veykril
`cargo clippy --fix` This PR is the result of running `cargo clippy --fix && cargo fmt` in the root of the repository. I did not manually review all the changes, but just skimmed through a few of them. The tests still pass, so it seems fine.
This commit is contained in:
commit
85c9a83262
175 changed files with 592 additions and 735 deletions
|
@ -364,8 +364,12 @@ impl ast::UseTreeList {
|
|||
let remove_brace_in_use_tree_list = |u: &ast::UseTreeList| {
|
||||
let use_tree_count = u.use_trees().count();
|
||||
if use_tree_count == 1 {
|
||||
u.l_curly_token().map(ted::remove);
|
||||
u.r_curly_token().map(ted::remove);
|
||||
if let Some(a) = u.l_curly_token() {
|
||||
ted::remove(a)
|
||||
}
|
||||
if let Some(a) = u.r_curly_token() {
|
||||
ted::remove(a)
|
||||
}
|
||||
u.comma().for_each(ted::remove);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue