diff options
author | Geobert Quach <[email protected]> | 2019-09-15 21:36:17 +0100 |
---|---|---|
committer | Geobert Quach <[email protected]> | 2019-09-19 22:12:28 +0100 |
commit | 889f1f0a7c4295503f65d11510e232c1ea757235 (patch) | |
tree | 1936e5674748168d9e0fe70656486c9b8f05a942 | |
parent | 016c99724356c5bd7e27bd7c6061c7a458f078bf (diff) |
feature(assists): Fix regression
-rw-r--r-- | crates/ra_assists/src/raw_string.rs | 4 |
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, |