diff options
author | Jonas Schievink <[email protected]> | 2020-06-09 16:32:42 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-06-10 11:38:58 +0100 |
commit | 4bcf8c8c68bd791f295aa06ef7903c006be3f356 (patch) | |
tree | 4bb9425b04484fcdedcc32f03728e60a438c0fbb /crates/ra_hir_expand | |
parent | 54936e8aa212ea5fdf737d8e1b0a02c231ed89eb (diff) |
Add an FST index to `ImportMap`
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r-- | crates/ra_hir_expand/src/name.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index 660bdfe33..f306d9641 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs | |||
@@ -67,6 +67,13 @@ impl Name { | |||
67 | _ => None, | 67 | _ => None, |
68 | } | 68 | } |
69 | } | 69 | } |
70 | |||
71 | pub fn as_text(&self) -> Option<&str> { | ||
72 | match &self.0 { | ||
73 | Repr::Text(s) => Some(s.as_str()), | ||
74 | _ => None, | ||
75 | } | ||
76 | } | ||
70 | } | 77 | } |
71 | 78 | ||
72 | pub trait AsName { | 79 | pub trait AsName { |