From ef442b8682909f2ab758f55507d4c2e81673cfa1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Feb 2019 13:53:35 +0300 Subject: Assign IDs to assists --- 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 2bed270a1..6ea48d909 100644 --- a/crates/ra_assists/src/remove_dbg.rs +++ b/crates/ra_assists/src/remove_dbg.rs @@ -6,7 +6,7 @@ use ra_syntax::{ L_PAREN, R_PAREN, L_CURLY, R_CURLY, L_BRACK, R_BRACK, EXCL }, }; -use crate::{AssistCtx, Assist}; +use crate::{AssistCtx, Assist, AssistId}; pub(crate) fn remove_dbg(mut ctx: AssistCtx) -> Option { let macro_call = ctx.node_at_offset::()?; @@ -46,7 +46,7 @@ pub(crate) fn remove_dbg(mut ctx: AssistCtx) -> Option macro_args.text().slice(start..end).to_string() }; - ctx.add_action("remove dbg!()", |edit| { + ctx.add_action(AssistId("remove_dbg"), "remove dbg!()", |edit| { edit.target(macro_call.syntax().range()); edit.replace(macro_range, macro_content); edit.set_cursor(cursor_pos); -- cgit v1.2.3