aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-02-07 18:42:00 +0000
committerVille Penttinen <[email protected]>2019-02-07 18:42:00 +0000
commitbe7c5eecc4ec9e099bf34e78289cd672aacbd168 (patch)
tree0700578703e1c0f270c5ff19d0090c5c644ef173 /crates/ra_assists/src
parent6cbf83c9462b993f2fa5b3c4334dd469c182c8af (diff)
Remove unnecessary dbg! calls
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r--crates/ra_assists/src/remove_dbg.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_assists/src/remove_dbg.rs b/crates/ra_assists/src/remove_dbg.rs
index 6609abab2..40f97a849 100644
--- a/crates/ra_assists/src/remove_dbg.rs
+++ b/crates/ra_assists/src/remove_dbg.rs
@@ -28,7 +28,7 @@ pub(crate) fn remove_dbg(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
28 .checked_sub(macro_range.start()) 28 .checked_sub(macro_range.start())
29 .unwrap_or_else(|| TextUnit::from(0)); 29 .unwrap_or_else(|| TextUnit::from(0));
30 30
31 let dbg_size = dbg!(TextUnit::of_str("dbg!(")); 31 let dbg_size = TextUnit::of_str("dbg!(");
32 32
33 if offset_start > dbg_size { 33 if offset_start > dbg_size {
34 file_range.start() - dbg_size 34 file_range.start() - dbg_size
@@ -39,8 +39,7 @@ pub(crate) fn remove_dbg(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
39 39
40 let macro_content = { 40 let macro_content = {
41 let macro_args = macro_call.token_tree()?.syntax(); 41 let macro_args = macro_call.token_tree()?.syntax();
42 let _ = dbg!(macro_args.text()); 42 let range = macro_args.range();
43 let range = dbg!(macro_args.range());
44 let start = range.start() + TextUnit::of_char('('); 43 let start = range.start() + TextUnit::of_char('(');
45 let end = range.end() - TextUnit::of_char(')'); 44 let end = range.end() - TextUnit::of_char(')');
46 45