Skip to content

Commit 2cfba36

Browse files
bors[bot]matklad
andauthored
Merge #3010
3010: minor, if let else -> match r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 1f7a54c + f5a2001 commit 2cfba36

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

crates/ra_ide/src/imports_locator.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,9 @@ impl ImportsLocator for ImportsLocatorIde<'_> {
6464
.into_iter()
6565
.chain(lib_results.into_iter())
6666
.filter_map(|import_candidate| self.get_name_definition(db, &import_candidate))
67-
.filter_map(|name_definition_to_import| {
68-
if let NameKind::Def(module_def) = name_definition_to_import.kind {
69-
Some(module_def)
70-
} else {
71-
None
72-
}
67+
.filter_map(|name_definition_to_import| match name_definition_to_import.kind {
68+
NameKind::Def(module_def) => Some(module_def),
69+
_ => None,
7370
})
7471
.collect()
7572
}

0 commit comments

Comments
 (0)