From eceaf94f1936436e33ae235ca65bf2a6d4f77da5 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 18 Feb 2020 15:32:19 +0200 Subject: More manual clippy fixes --- crates/ra_hir_ty/src/test_db.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir_ty/src/test_db.rs') diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs index 1a31b587b..c794f7b84 100644 --- a/crates/ra_hir_ty/src/test_db.rs +++ b/crates/ra_hir_ty/src/test_db.rs @@ -86,15 +86,14 @@ impl TestDB { pub fn diagnostics(&self) -> String { let mut buf = String::new(); let crate_graph = self.crate_graph(); - for krate in crate_graph.iter().next() { + for krate in crate_graph.iter() { let crate_def_map = self.crate_def_map(krate); let mut fns = Vec::new(); for (module_id, _) in crate_def_map.modules.iter() { for decl in crate_def_map[module_id].scope.declarations() { - match decl { - ModuleDefId::FunctionId(f) => fns.push(f), - _ => (), + if let ModuleDefId::FunctionId(f) = decl { + fns.push(f) } } -- cgit v1.2.3