aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/main_loop/handlers.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/crates/rust-analyzer/src/main_loop/handlers.rs b/crates/rust-analyzer/src/main_loop/handlers.rs
index b4e539906..647bdc426 100644
--- a/crates/rust-analyzer/src/main_loop/handlers.rs
+++ b/crates/rust-analyzer/src/main_loop/handlers.rs
@@ -19,8 +19,7 @@ use lsp_types::{
19 TextEdit, Url, WorkspaceEdit, 19 TextEdit, Url, WorkspaceEdit,
20}; 20};
21use ra_ide::{ 21use ra_ide::{
22 Assist, AssistId, FileId, FilePosition, FileRange, Query, RangeInfo, Runnable, RunnableKind, 22 Assist, FileId, FilePosition, FileRange, Query, RangeInfo, Runnable, RunnableKind, SearchScope,
23 SearchScope,
24}; 23};
25use ra_prof::profile; 24use ra_prof::profile;
26use ra_syntax::{AstNode, SyntaxKind, TextRange, TextSize}; 25use ra_syntax::{AstNode, SyntaxKind, TextRange, TextSize};
@@ -702,15 +701,9 @@ fn create_single_code_action(assist: Assist, world: &WorldSnapshot) -> Result<Co
702 arguments: Some(vec![arg]), 701 arguments: Some(vec![arg]),
703 }; 702 };
704 703
705 let kind = match assist.id {
706 AssistId("introduce_variable") => Some("refactor.extract.variable".to_string()),
707 AssistId("add_custom_impl") => Some("refactor.rewrite.add_custom_impl".to_string()),
708 _ => None,
709 };
710
711 Ok(CodeAction { 704 Ok(CodeAction {
712 title, 705 title,
713 kind, 706 kind: Some("refactor".to_owned()),
714 diagnostics: None, 707 diagnostics: None,
715 edit: None, 708 edit: None,
716 command: Some(command), 709 command: Some(command),