We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d597369 + 7e7f401 commit f96442aCopy full SHA for f96442a
crates/rust-analyzer/src/handlers/request.rs
@@ -1156,7 +1156,8 @@ pub(crate) fn handle_code_action(
1156
let code_action = to_proto::code_action(&snap, assist, resolve_data)?;
1157
1158
// Check if the client supports the necessary `ResourceOperation`s.
1159
- 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());
1160
+ if let Some(changes) = changes {
1161
for change in changes {
1162
if let lsp_ext::SnippetDocumentChangeOperation::Op(res_op) = change {
1163
if let Err(err) =
0 commit comments