From ecd420636efe54657ae742ce960ce061740ef108 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 10:01:10 -0400 Subject: Fix clippy::single_match --- crates/ra_cli/src/analysis_stats.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/ra_cli') diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs index b481ace9e..8bb524ce3 100644 --- a/crates/ra_cli/src/analysis_stats.rs +++ b/crates/ra_cli/src/analysis_stats.rs @@ -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); } } } -- cgit v1.2.3