Fix panic in handle_code_action
This commit is contained in:
parent
60d046f567
commit
7e7f401a81
@ -1156,7 +1156,8 @@ pub(crate) fn handle_code_action(
|
||||
let code_action = to_proto::code_action(&snap, assist, resolve_data)?;
|
||||
|
||||
// Check if the client supports the necessary `ResourceOperation`s.
|
||||
if let Some(changes) = code_action.edit.as_ref().and_then(|it| &it.document_changes) {
|
||||
let changes = code_action.edit.as_ref().and_then(|it| it.document_changes.as_ref());
|
||||
if let Some(changes) = changes {
|
||||
for change in changes {
|
||||
if let lsp_ext::SnippetDocumentChangeOperation::Op(res_op) = change {
|
||||
if let Err(err) =
|
||||
|
Loading…
Reference in New Issue
Block a user