diff options
author | Aleksey Kladov <[email protected]> | 2019-07-20 10:58:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-20 10:58:27 +0100 |
commit | f3bdbec1b68fa0e20f0b7b6c6ef64e1507970b0d (patch) | |
tree | f2cb82f74d2d60d5351c3d7c4d8e7bce4d351cab /crates/ra_assists/src/remove_dbg.rs | |
parent | 6d5d82e412dea19ea48eecc6f7d5a4aa223a9599 (diff) |
rename range -> text_range
Diffstat (limited to 'crates/ra_assists/src/remove_dbg.rs')
-rw-r--r-- | crates/ra_assists/src/remove_dbg.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/remove_dbg.rs b/crates/ra_assists/src/remove_dbg.rs index 5657ee4b8..870133fda 100644 --- a/crates/ra_assists/src/remove_dbg.rs +++ b/crates/ra_assists/src/remove_dbg.rs | |||
@@ -12,7 +12,7 @@ pub(crate) fn remove_dbg(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> | |||
12 | return None; | 12 | return None; |
13 | } | 13 | } |
14 | 14 | ||
15 | let macro_range = macro_call.syntax().range(); | 15 | let macro_range = macro_call.syntax().text_range(); |
16 | 16 | ||
17 | // If the cursor is inside the macro call, we'll try to maintain the cursor | 17 | // If the cursor is inside the macro call, we'll try to maintain the cursor |
18 | // position by subtracting the length of dbg!( from the start of the file | 18 | // position by subtracting the length of dbg!( from the start of the file |
@@ -43,7 +43,7 @@ pub(crate) fn remove_dbg(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | ctx.add_action(AssistId("remove_dbg"), "remove dbg!()", |edit| { | 45 | ctx.add_action(AssistId("remove_dbg"), "remove dbg!()", |edit| { |
46 | edit.target(macro_call.syntax().range()); | 46 | edit.target(macro_call.syntax().text_range()); |
47 | edit.replace(macro_range, macro_content); | 47 | edit.replace(macro_range, macro_content); |
48 | edit.set_cursor(cursor_pos); | 48 | edit.set_cursor(cursor_pos); |
49 | }); | 49 | }); |