aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_postfix.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_postfix.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_postfix.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide_api/src/completion/complete_postfix.rs
index c75b1c159..6d834f6ce 100644
--- a/crates/ra_ide_api/src/completion/complete_postfix.rs
+++ b/crates/ra_ide_api/src/completion/complete_postfix.rs
@@ -12,7 +12,7 @@ use ra_text_edit::TextEditBuilder;
12fn postfix_snippet(ctx: &CompletionContext, label: &str, detail: &str, snippet: &str) -> Builder { 12fn postfix_snippet(ctx: &CompletionContext, label: &str, detail: &str, snippet: &str) -> Builder {
13 let edit = { 13 let edit = {
14 let receiver_range = 14 let receiver_range =
15 ctx.dot_receiver.as_ref().expect("no receiver available").syntax().range(); 15 ctx.dot_receiver.as_ref().expect("no receiver available").syntax().text_range();
16 let delete_range = TextRange::from_to(receiver_range.start(), ctx.source_range().end()); 16 let delete_range = TextRange::from_to(receiver_range.start(), ctx.source_range().end());
17 let mut builder = TextEditBuilder::default(); 17 let mut builder = TextEditBuilder::default();
18 builder.replace(delete_range, snippet.to_string()); 18 builder.replace(delete_range, snippet.to_string());