mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Fix clippy::single_match
This commit is contained in:
parent
354db651da
commit
ecd420636e
9 changed files with 51 additions and 76 deletions
|
@ -31,18 +31,16 @@ pub fn run(verbose: bool, path: &str, only: Option<&str>) -> Result<()> {
|
|||
|
||||
for decl in module.declarations(&db) {
|
||||
num_decls += 1;
|
||||
match decl {
|
||||
ModuleDef::Function(f) => funcs.push(f),
|
||||
_ => {}
|
||||
if let ModuleDef::Function(f) = decl {
|
||||
funcs.push(f);
|
||||
}
|
||||
}
|
||||
|
||||
for impl_block in module.impl_blocks(&db) {
|
||||
for item in impl_block.items(&db) {
|
||||
num_decls += 1;
|
||||
match item {
|
||||
ImplItem::Method(f) => funcs.push(f),
|
||||
_ => {}
|
||||
if let ImplItem::Method(f) = item {
|
||||
funcs.push(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue