mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Address some FIXMEs
Signed-off-by: JmPotato <ghzpotato@gmail.com>
This commit is contained in:
parent
b050937c10
commit
dc6e1e0dac
6 changed files with 32 additions and 18 deletions
|
@ -864,7 +864,7 @@ pub(crate) fn handle_resolve_code_action(
|
|||
let (id_string, index) = split_once(¶ms.id, ':').unwrap();
|
||||
let index = index.parse::<usize>().unwrap();
|
||||
let assist = &assists[index];
|
||||
assert!(assist.assist.id.0 == id_string);
|
||||
assert!(assist.assist.id().0 == id_string);
|
||||
Ok(to_proto::resolved_code_action(&snap, assist.clone())?.edit)
|
||||
}
|
||||
|
||||
|
|
|
@ -704,10 +704,10 @@ pub(crate) fn unresolved_code_action(
|
|||
index: usize,
|
||||
) -> Result<lsp_ext::CodeAction> {
|
||||
let res = lsp_ext::CodeAction {
|
||||
title: assist.label,
|
||||
id: Some(format!("{}:{}", assist.id.0.to_owned(), index.to_string())),
|
||||
group: assist.group.filter(|_| snap.config.client_caps.code_action_group).map(|gr| gr.0),
|
||||
kind: Some(code_action_kind(assist.id.1)),
|
||||
title: assist.label(),
|
||||
id: Some(format!("{}:{}", assist.id().0.to_owned(), index.to_string())),
|
||||
group: assist.group().filter(|_| snap.config.client_caps.code_action_group).map(|gr| gr.0),
|
||||
kind: Some(code_action_kind(assist.id().1)),
|
||||
edit: None,
|
||||
is_preferred: None,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue