aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/test_db.rs
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-02-18 13:32:19 +0000
committerKirill Bulatov <[email protected]>2020-02-18 14:12:37 +0000
commiteceaf94f1936436e33ae235ca65bf2a6d4f77da5 (patch)
tree83d42e6f014f80b84f9193e6b5c7c1e2aded9fa7 /crates/ra_hir_ty/src/test_db.rs
parentb8ddcb0652f3ec8683023afc1e1f5166d6a712f4 (diff)
More manual clippy fixes
Diffstat (limited to 'crates/ra_hir_ty/src/test_db.rs')
-rw-r--r--crates/ra_hir_ty/src/test_db.rs7
1 files changed, 3 insertions, 4 deletions
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 {
86 pub fn diagnostics(&self) -> String { 86 pub fn diagnostics(&self) -> String {
87 let mut buf = String::new(); 87 let mut buf = String::new();
88 let crate_graph = self.crate_graph(); 88 let crate_graph = self.crate_graph();
89 for krate in crate_graph.iter().next() { 89 for krate in crate_graph.iter() {
90 let crate_def_map = self.crate_def_map(krate); 90 let crate_def_map = self.crate_def_map(krate);
91 91
92 let mut fns = Vec::new(); 92 let mut fns = Vec::new();
93 for (module_id, _) in crate_def_map.modules.iter() { 93 for (module_id, _) in crate_def_map.modules.iter() {
94 for decl in crate_def_map[module_id].scope.declarations() { 94 for decl in crate_def_map[module_id].scope.declarations() {
95 match decl { 95 if let ModuleDefId::FunctionId(f) = decl {
96 ModuleDefId::FunctionId(f) => fns.push(f), 96 fns.push(f)
97 _ => (),
98 } 97 }
99 } 98 }
100 99