mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
cargo clippy --fix
This commit is contained in:
parent
1ab8c7fd27
commit
fad4fa163c
178 changed files with 595 additions and 738 deletions
|
@ -356,8 +356,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