diff options
Diffstat (limited to 'crates/libsyntax2/src')
-rw-r--r-- | crates/libsyntax2/src/yellow/syntax_text.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/yellow/syntax_text.rs b/crates/libsyntax2/src/yellow/syntax_text.rs index d299fd700..b855687c4 100644 --- a/crates/libsyntax2/src/yellow/syntax_text.rs +++ b/crates/libsyntax2/src/yellow/syntax_text.rs | |||
@@ -31,6 +31,9 @@ impl<'a> SyntaxText<'a> { | |||
31 | Some(&text[range]) | 31 | Some(&text[range]) |
32 | }) | 32 | }) |
33 | } | 33 | } |
34 | pub fn push_to(&self, buf: &mut String) { | ||
35 | self.chunks().for_each(|it| buf.push_str(it)); | ||
36 | } | ||
34 | pub fn to_string(&self) -> String { | 37 | pub fn to_string(&self) -> String { |
35 | self.chunks().collect() | 38 | self.chunks().collect() |
36 | } | 39 | } |