diff options
author | Aleksey Kladov <[email protected]> | 2018-08-17 13:37:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-17 13:37:17 +0100 |
commit | 081c16c77642a5c86ed72c5fbd11deccc2edd5d5 (patch) | |
tree | 90ddf4f92954fcb00f4c20a46968932c5f0bbdea /crates/libanalysis/src/symbol_index.rs | |
parent | 55e87e0b742b46d40b1a5ef1598804e48e45f0e0 (diff) |
initial mod resolve
Diffstat (limited to 'crates/libanalysis/src/symbol_index.rs')
-rw-r--r-- | crates/libanalysis/src/symbol_index.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/libanalysis/src/symbol_index.rs b/crates/libanalysis/src/symbol_index.rs index 35141cfdc..3c3252956 100644 --- a/crates/libanalysis/src/symbol_index.rs +++ b/crates/libanalysis/src/symbol_index.rs | |||
@@ -62,10 +62,10 @@ impl Query { | |||
62 | self.limit = limit | 62 | self.limit = limit |
63 | } | 63 | } |
64 | 64 | ||
65 | pub(crate) fn process<'a>( | 65 | pub(crate) fn process( |
66 | &mut self, | 66 | &mut self, |
67 | file: &'a FileSymbols, | 67 | file: &FileSymbols, |
68 | ) -> Vec<&'a FileSymbol> { | 68 | ) -> Vec<FileSymbol> { |
69 | fn is_type(kind: SyntaxKind) -> bool { | 69 | fn is_type(kind: SyntaxKind) -> bool { |
70 | match kind { | 70 | match kind { |
71 | STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_DEF => true, | 71 | STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_DEF => true, |
@@ -87,7 +87,7 @@ impl Query { | |||
87 | if self.exact && symbol.name != self.query { | 87 | if self.exact && symbol.name != self.query { |
88 | continue; | 88 | continue; |
89 | } | 89 | } |
90 | res.push(symbol); | 90 | res.push(symbol.clone()); |
91 | self.limit -= 1; | 91 | self.limit -= 1; |
92 | } | 92 | } |
93 | res | 93 | res |