mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Merge #4571
4571: KISS SourceChange r=matklad a=matklad The idea behind requiring the label is a noble one, but we are not really using it consistently anyway, and it should be easy to retrofit later, should we need it. bors r+ Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
a95bb1355d
8 changed files with 112 additions and 153 deletions
|
@ -731,9 +731,9 @@ pub fn handle_code_action(
|
|||
.filter(|(diag_range, _fix)| diag_range.intersect(range).is_some())
|
||||
.map(|(_range, fix)| fix);
|
||||
|
||||
for source_edit in fixes_from_diagnostics {
|
||||
let title = source_edit.label.clone();
|
||||
let edit = to_proto::snippet_workspace_edit(&world, source_edit)?;
|
||||
for fix in fixes_from_diagnostics {
|
||||
let title = fix.label;
|
||||
let edit = to_proto::snippet_workspace_edit(&world, fix.source_change)?;
|
||||
let action =
|
||||
lsp_ext::CodeAction { title, group: None, kind: None, edit: Some(edit), command: None };
|
||||
res.push(action);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue