aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/typing
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-22 17:03:08 +0100
committerAleksey Kladov <[email protected]>2020-05-22 17:04:26 +0100
commit2c04aad2d2a52ce52d6ea6452faf8d1788f0c83f (patch)
tree281b8320f78424383e0f45f2bfd678c07a5360ae /crates/ra_ide/src/typing
parent2075e77ee5784e72396c64c9ca059763508219ff (diff)
KISS SourceChange
The idea behind requiring the label is a noble one, but we are not really using it consistently anyway, and it should be easy to retrofit later, should we need it.
Diffstat (limited to 'crates/ra_ide/src/typing')
-rw-r--r--crates/ra_ide/src/typing/on_enter.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_ide/src/typing/on_enter.rs b/crates/ra_ide/src/typing/on_enter.rs
index 85be14ad3..e7d64b4f6 100644
--- a/crates/ra_ide/src/typing/on_enter.rs
+++ b/crates/ra_ide/src/typing/on_enter.rs
@@ -41,10 +41,7 @@ pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option<Sour
41 let inserted = format!("\n{}{} $0", indent, prefix); 41 let inserted = format!("\n{}{} $0", indent, prefix);
42 let edit = TextEdit::insert(position.offset, inserted); 42 let edit = TextEdit::insert(position.offset, inserted);
43 43
44 let mut res = SourceChange::source_file_edit( 44 let mut res = SourceChange::from(SourceFileEdit { edit, file_id: position.file_id });
45 "On enter",
46 SourceFileEdit { edit, file_id: position.file_id },
47 );
48 res.is_snippet = true; 45 res.is_snippet = true;
49 Some(res) 46 Some(res)
50} 47}