mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
simplify
This commit is contained in:
parent
69eeae0c99
commit
ba02a55330
2 changed files with 8 additions and 35 deletions
|
@ -31,6 +31,9 @@ impl<'a> SyntaxText<'a> {
|
|||
Some(&text[range])
|
||||
})
|
||||
}
|
||||
pub fn push_to(&self, buf: &mut String) {
|
||||
self.chunks().for_each(|it| buf.push_str(it));
|
||||
}
|
||||
pub fn to_string(&self) -> String {
|
||||
self.chunks().collect()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue