diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-06 11:52:57 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-06 11:52:57 +0100 |
commit | 4de3c3eedc1f6576d59e00f0ddde3c70c97be066 (patch) | |
tree | 7922dca3f7c4133e2616257be537428337e479d6 /crates/ra_assists/src/handlers/remove_dbg.rs | |
parent | ede8906844e206f252810d58533538cf1fb326d4 (diff) | |
parent | 233f01c9ba555e5d06f336cb0ff64e7a83e4a23a (diff) |
Merge #4341
4341: Move target to AssistLabel r=matklad a=matklad
Target is used for assists sorting, so we need it before we compute
the action.
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/handlers/remove_dbg.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/remove_dbg.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/remove_dbg.rs b/crates/ra_assists/src/handlers/remove_dbg.rs index ddfb21a7e..e6e02f2ae 100644 --- a/crates/ra_assists/src/handlers/remove_dbg.rs +++ b/crates/ra_assists/src/handlers/remove_dbg.rs | |||
@@ -57,8 +57,8 @@ pub(crate) fn remove_dbg(ctx: AssistCtx) -> Option<Assist> { | |||
57 | text.slice(without_parens).to_string() | 57 | text.slice(without_parens).to_string() |
58 | }; | 58 | }; |
59 | 59 | ||
60 | ctx.add_assist(AssistId("remove_dbg"), "Remove dbg!()", |edit| { | 60 | let target = macro_call.syntax().text_range(); |
61 | edit.target(macro_call.syntax().text_range()); | 61 | ctx.add_assist(AssistId("remove_dbg"), "Remove dbg!()", target, |edit| { |
62 | edit.replace(macro_range, macro_content); | 62 | edit.replace(macro_range, macro_content); |
63 | edit.set_cursor(cursor_pos); | 63 | edit.set_cursor(cursor_pos); |
64 | }) | 64 | }) |