aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide/src/imports_locator.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/ra_ide/src/imports_locator.rs b/crates/ra_ide/src/imports_locator.rs
index 48b014c7d..9e1a1c1ec 100644
--- a/crates/ra_ide/src/imports_locator.rs
+++ b/crates/ra_ide/src/imports_locator.rs
@@ -64,12 +64,9 @@ impl ImportsLocator for ImportsLocatorIde<'_> {
64 .into_iter() 64 .into_iter()
65 .chain(lib_results.into_iter()) 65 .chain(lib_results.into_iter())
66 .filter_map(|import_candidate| self.get_name_definition(db, &import_candidate)) 66 .filter_map(|import_candidate| self.get_name_definition(db, &import_candidate))
67 .filter_map(|name_definition_to_import| { 67 .filter_map(|name_definition_to_import| match name_definition_to_import.kind {
68 if let NameKind::Def(module_def) = name_definition_to_import.kind { 68 NameKind::Def(module_def) => Some(module_def),
69 Some(module_def) 69 _ => None,
70 } else {
71 None
72 }
73 }) 70 })
74 .collect() 71 .collect()
75 } 72 }