diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-04 12:42:32 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-04 12:42:32 +0000 |
commit | 2cfba36debf581b7cab31e307848c3c7c4a26deb (patch) | |
tree | fec5c82d14126ebc075305fd3f0a48d60020e9e1 /crates/ra_ide | |
parent | 1f7a54cfa71a0b81f3f35cde1a529f19f6816a10 (diff) | |
parent | f5a20014ce8787ebe4c910b9f0b4cf52d6130121 (diff) |
Merge #3010
3010: minor, if let else -> match r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/src/imports_locator.rs | 9 |
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 | } |