mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Merge #3010
3010: minor, if let else -> match r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
2cfba36deb
1 changed files with 3 additions and 6 deletions
|
@ -64,12 +64,9 @@ impl ImportsLocator for ImportsLocatorIde<'_> {
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.chain(lib_results.into_iter())
|
.chain(lib_results.into_iter())
|
||||||
.filter_map(|import_candidate| self.get_name_definition(db, &import_candidate))
|
.filter_map(|import_candidate| self.get_name_definition(db, &import_candidate))
|
||||||
.filter_map(|name_definition_to_import| {
|
.filter_map(|name_definition_to_import| match name_definition_to_import.kind {
|
||||||
if let NameKind::Def(module_def) = name_definition_to_import.kind {
|
NameKind::Def(module_def) => Some(module_def),
|
||||||
Some(module_def)
|
_ => None,
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue