diff options
author | Aleksey Kladov <[email protected]> | 2019-01-08 09:23:10 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-08 09:23:10 +0000 |
commit | fa6e0b0d38d2a030b959be91232927b9c096272b (patch) | |
tree | 81b546c105388e1fc3154c90a42a8cc5fb930d0b /crates/ra_analysis | |
parent | 3f4be819125ce4a22edd86721fa56b5caba99c2e (diff) |
itroduce trait for ast tokens
Diffstat (limited to 'crates/ra_analysis')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 2 | ||||
-rw-r--r-- | crates/ra_analysis/src/symbol_index.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 8ac430e41..98554dd4c 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -115,7 +115,7 @@ impl db::RootDatabase { | |||
115 | let name = ast_module.name().unwrap(); | 115 | let name = ast_module.name().unwrap(); |
116 | Ok(vec![NavigationTarget { | 116 | Ok(vec![NavigationTarget { |
117 | file_id, | 117 | file_id, |
118 | name: name.text(), | 118 | name: name.text().clone(), |
119 | range: name.syntax().range(), | 119 | range: name.syntax().range(), |
120 | kind: MODULE, | 120 | kind: MODULE, |
121 | ptr: None, | 121 | ptr: None, |
diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index ed1796756..8dd15b40e 100644 --- a/crates/ra_analysis/src/symbol_index.rs +++ b/crates/ra_analysis/src/symbol_index.rs | |||
@@ -205,7 +205,7 @@ pub(crate) struct FileSymbol { | |||
205 | 205 | ||
206 | fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, LocalSyntaxPtr)> { | 206 | fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, LocalSyntaxPtr)> { |
207 | fn decl<N: NameOwner>(node: &N) -> Option<(SmolStr, LocalSyntaxPtr)> { | 207 | fn decl<N: NameOwner>(node: &N) -> Option<(SmolStr, LocalSyntaxPtr)> { |
208 | let name = node.name()?.text(); | 208 | let name = node.name()?.text().clone(); |
209 | let ptr = LocalSyntaxPtr::new(node.syntax()); | 209 | let ptr = LocalSyntaxPtr::new(node.syntax()); |
210 | Some((name, ptr)) | 210 | Some((name, ptr)) |
211 | } | 211 | } |