aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_assists/src/raw_string.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/raw_string.rs b/crates/ra_assists/src/raw_string.rs
index 10ed93173..867f09f28 100644
--- a/crates/ra_assists/src/raw_string.rs
+++ b/crates/ra_assists/src/raw_string.rs
@@ -45,8 +45,8 @@ pub(crate) fn make_usual_string(mut ctx: AssistCtx<impl HirDatabase>) -> Option<
45 )); 45 ));
46 // parse inside string to escape `"` 46 // parse inside string to escape `"`
47 let start_of_inside = usual_start_pos + TextUnit::from(1); 47 let start_of_inside = usual_start_pos + TextUnit::from(1);
48 let inside_str = 48 let end_of_inside = text.len() - usual_start_pos - TextUnit::from(1);
49 text.slice(TextRange::from_to(start_of_inside, text.len() - TextUnit::from(2))); 49 let inside_str = text.slice(TextRange::from_to(start_of_inside, end_of_inside));
50 escape_quote( 50 escape_quote(
51 edit, 51 edit,
52 &inside_str, 52 &inside_str,