diff options
author | Aleksey Kladov <[email protected]> | 2020-08-18 15:41:21 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-18 15:50:07 +0100 |
commit | aa1a7a5414e59c7f1c6e74002df1b6a04937459e (patch) | |
tree | 6d112b6a8614138ebffa8bef0b27d90f8ef2cef9 /crates/rust-analyzer | |
parent | eb81731600d1bc50efc00e32b9fc2244a2af52ad (diff) |
Introduce Label
Diffstat (limited to 'crates/rust-analyzer')
-rw-r--r-- | crates/rust-analyzer/src/handlers.rs | 3 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index 69ab1b3b1..f8159d0f4 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs | |||
@@ -782,10 +782,9 @@ fn handle_fixes( | |||
782 | .filter_map(|d| d.fix) | 782 | .filter_map(|d| d.fix) |
783 | .filter(|fix| fix.fix_trigger_range.intersect(range).is_some()) | 783 | .filter(|fix| fix.fix_trigger_range.intersect(range).is_some()) |
784 | { | 784 | { |
785 | let title = fix.label; | ||
786 | let edit = to_proto::snippet_workspace_edit(&snap, fix.source_change)?; | 785 | let edit = to_proto::snippet_workspace_edit(&snap, fix.source_change)?; |
787 | let action = lsp_ext::CodeAction { | 786 | let action = lsp_ext::CodeAction { |
788 | title, | 787 | title: fix.label.to_string(), |
789 | id: None, | 788 | id: None, |
790 | group: None, | 789 | group: None, |
791 | kind: Some(CodeActionKind::QUICKFIX), | 790 | kind: Some(CodeActionKind::QUICKFIX), |
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 535de2f71..643dcb4fc 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -704,7 +704,7 @@ pub(crate) fn unresolved_code_action( | |||
704 | index: usize, | 704 | index: usize, |
705 | ) -> Result<lsp_ext::CodeAction> { | 705 | ) -> Result<lsp_ext::CodeAction> { |
706 | let res = lsp_ext::CodeAction { | 706 | let res = lsp_ext::CodeAction { |
707 | title: assist.label().to_string(), | 707 | title: assist.label.to_string(), |
708 | id: Some(format!("{}:{}", assist.id.0, index.to_string())), | 708 | id: Some(format!("{}:{}", assist.id.0, index.to_string())), |
709 | group: assist.group.filter(|_| snap.config.client_caps.code_action_group).map(|gr| gr.0), | 709 | group: assist.group.filter(|_| snap.config.client_caps.code_action_group).map(|gr| gr.0), |
710 | kind: Some(code_action_kind(assist.id.1)), | 710 | kind: Some(code_action_kind(assist.id.1)), |