mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Auto merge of #15177 - rust-lang:Veykril-patch-1, r=Veykril
Fix panic in `handle_code_action`
🤞 that CI is happy with this, edited this via github
This commit is contained in:
commit
f96442aa90
1 changed files with 2 additions and 1 deletions
|
@ -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().unwrap().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…
Add table
Add a link
Reference in a new issue