@@ -11,7 +11,7 @@ use ra_prof::profile;
11
11
use ra_syntax:: { ast, AstNode , SyntaxKind :: NAME } ;
12
12
13
13
use crate :: {
14
- references:: { classify_name, NameDefinition , NameKind } ,
14
+ references:: { classify_name, NameKind } ,
15
15
Query ,
16
16
} ;
17
17
@@ -28,7 +28,7 @@ impl<'a> ImportsLocatorIde<'a> {
28
28
& mut self ,
29
29
db : & impl HirDatabase ,
30
30
import_candidate : & FileSymbol ,
31
- ) -> Option < NameDefinition > {
31
+ ) -> Option < NameKind > {
32
32
let _p = profile ( "get_name_definition" ) ;
33
33
let file_id = import_candidate. file_id . into ( ) ;
34
34
let candidate_node = import_candidate. ptr . to_node ( & db. parse_or_expand ( file_id) ?) ;
@@ -41,6 +41,7 @@ impl<'a> ImportsLocatorIde<'a> {
41
41
& mut self . source_binder ,
42
42
hir:: InFile { file_id, value : & ast:: Name :: cast ( candidate_name_node) ? } ,
43
43
)
44
+ . map ( |it| it. kind )
44
45
}
45
46
}
46
47
@@ -67,7 +68,7 @@ impl ImportsLocator for ImportsLocatorIde<'_> {
67
68
. into_iter ( )
68
69
. chain ( lib_results. into_iter ( ) )
69
70
. filter_map ( |import_candidate| self . get_name_definition ( db, & import_candidate) )
70
- . filter_map ( |name_definition_to_import| match name_definition_to_import. kind {
71
+ . filter_map ( |name_definition_to_import| match name_definition_to_import {
71
72
NameKind :: Def ( module_def) => Some ( module_def) ,
72
73
_ => None ,
73
74
} )
0 commit comments