Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting/injector.rs')
| -rw-r--r-- | crates/ide/src/syntax_highlighting/injector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/syntax_highlighting/injector.rs b/crates/ide/src/syntax_highlighting/injector.rs index 211dc54f2b..a902fd717f 100644 --- a/crates/ide/src/syntax_highlighting/injector.rs +++ b/crates/ide/src/syntax_highlighting/injector.rs @@ -29,8 +29,8 @@ impl Injector { self.buf.push_str(text); } - pub(super) fn text(&self) -> &str { - &self.buf + pub(super) fn take_text(&mut self) -> String { + std::mem::take(&mut self.buf) } pub(super) fn map_range_up(&self, range: TextRange) -> impl Iterator<Item = TextRange> + '_ { |