aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-04 12:41:56 +0000
committerAleksey Kladov <[email protected]>2020-02-04 12:41:56 +0000
commitf5a20014ce8787ebe4c910b9f0b4cf52d6130121 (patch)
treefec5c82d14126ebc075305fd3f0a48d60020e9e1 /crates
parent4ea0c12cf1520bc7d0f5def211a7cacadb45b7af (diff)
minor, if let else -> match
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 }