diff options
Diffstat (limited to 'crates/ra_syntax/src/ast/mod.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/mod.rs b/crates/ra_syntax/src/ast/mod.rs index 686b5cf04..7077e3492 100644 --- a/crates/ra_syntax/src/ast/mod.rs +++ b/crates/ra_syntax/src/ast/mod.rs | |||
@@ -140,6 +140,12 @@ impl<'a> Byte<'a> { | |||
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | impl<'a> ByteString<'a> { | ||
144 | pub fn text(&self) -> &SmolStr { | ||
145 | &self.syntax().leaf_text().unwrap() | ||
146 | } | ||
147 | } | ||
148 | |||
143 | impl<'a> String<'a> { | 149 | impl<'a> String<'a> { |
144 | pub fn text(&self) -> &SmolStr { | 150 | pub fn text(&self) -> &SmolStr { |
145 | &self.syntax().leaf_text().unwrap() | 151 | &self.syntax().leaf_text().unwrap() |