diff options
author | Aleksey Kladov <[email protected]> | 2018-08-28 20:58:02 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-28 20:58:02 +0100 |
commit | ba02a55330d2ec9a0ea2c5cd457b82782ae299e9 (patch) | |
tree | 99f5fb731559f15428eb7ddc2273206a921e311f /crates/libsyntax2/src/yellow/syntax_text.rs | |
parent | 69eeae0c9903931f13038f4e350fd53b1903530d (diff) |
simplify
Diffstat (limited to 'crates/libsyntax2/src/yellow/syntax_text.rs')
-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 | } |