aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_text_edit
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_text_edit')
-rw-r--r--crates/ra_text_edit/src/text_edit.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_text_edit/src/text_edit.rs b/crates/ra_text_edit/src/text_edit.rs
index 0881f3e1c..a288a990d 100644
--- a/crates/ra_text_edit/src/text_edit.rs
+++ b/crates/ra_text_edit/src/text_edit.rs
@@ -7,15 +7,12 @@ pub struct TextEdit {
7 atoms: Vec<AtomTextEdit>, 7 atoms: Vec<AtomTextEdit>,
8} 8}
9 9
10#[derive(Debug)] 10#[derive(Debug, Default)]
11pub struct TextEditBuilder { 11pub struct TextEditBuilder {
12 atoms: Vec<AtomTextEdit>, 12 atoms: Vec<AtomTextEdit>,
13} 13}
14 14
15impl TextEditBuilder { 15impl TextEditBuilder {
16 pub fn new() -> TextEditBuilder {
17 TextEditBuilder { atoms: Vec::new() }
18 }
19 pub fn replace(&mut self, range: TextRange, replace_with: String) { 16 pub fn replace(&mut self, range: TextRange, replace_with: String) {
20 self.atoms.push(AtomTextEdit::replace(range, replace_with)) 17 self.atoms.push(AtomTextEdit::replace(range, replace_with))
21 } 18 }