From f3bdbec1b68fa0e20f0b7b6c6ef64e1507970b0d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 20 Jul 2019 12:58:27 +0300 Subject: rename range -> text_range --- crates/ra_assists/src/remove_dbg.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists/src/remove_dbg.rs') 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) -> Option return None; } - let macro_range = macro_call.syntax().range(); + let macro_range = macro_call.syntax().text_range(); // If the cursor is inside the macro call, we'll try to maintain the cursor // 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) -> Option }; ctx.add_action(AssistId("remove_dbg"), "remove dbg!()", |edit| { - edit.target(macro_call.syntax().range()); + edit.target(macro_call.syntax().text_range()); edit.replace(macro_range, macro_content); edit.set_cursor(cursor_pos); }); -- cgit v1.2.3