Skip to content

Commit f96442a

Browse files
committed
Auto merge of rust-lang#15177 - rust-lang:Veykril-patch-1, r=Veykril
Fix panic in `handle_code_action` 🤞 that CI is happy with this, edited this via github
2 parents d597369 + 7e7f401 commit f96442a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/rust-analyzer/src/handlers/request.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,8 @@ pub(crate) fn handle_code_action(
11561156
let code_action = to_proto::code_action(&snap, assist, resolve_data)?;
11571157

11581158
// Check if the client supports the necessary `ResourceOperation`s.
1159-
if let Some(changes) = &code_action.edit.as_ref().unwrap().document_changes {
1159+
let changes = code_action.edit.as_ref().and_then(|it| it.document_changes.as_ref());
1160+
if let Some(changes) = changes {
11601161
for change in changes {
11611162
if let lsp_ext::SnippetDocumentChangeOperation::Op(res_op) = change {
11621163
if let Err(err) =

0 commit comments

Comments
 (0)