@@ -248,9 +248,9 @@ fn handle_pull_diagnostics_response(
248
248
uri : Uri ,
249
249
document_id : DocumentId ,
250
250
) {
251
- let related_documents = match result {
251
+ match result {
252
252
lsp:: DocumentDiagnosticReportResult :: Report ( report) => {
253
- let ( result_id, related_documents ) = match report {
253
+ let result_id = match report {
254
254
lsp:: DocumentDiagnosticReport :: Full ( report) => {
255
255
editor. handle_lsp_diagnostics (
256
256
& provider,
@@ -259,41 +259,17 @@ fn handle_pull_diagnostics_response(
259
259
report. full_document_diagnostic_report . items ,
260
260
) ;
261
261
262
- (
263
- report . full_document_diagnostic_report . result_id ,
264
- report . related_documents ,
265
- )
262
+ report . full_document_diagnostic_report . result_id
263
+ }
264
+ lsp :: DocumentDiagnosticReport :: Unchanged ( report ) => {
265
+ Some ( report . unchanged_document_diagnostic_report . result_id )
266
266
}
267
- lsp:: DocumentDiagnosticReport :: Unchanged ( report) => (
268
- Some ( report. unchanged_document_diagnostic_report . result_id ) ,
269
- report. related_documents ,
270
- ) ,
271
267
} ;
272
268
273
269
if let Some ( doc) = editor. document_mut ( document_id) {
274
270
doc. previous_diagnostic_id = result_id;
275
271
} ;
276
-
277
- related_documents
278
272
}
279
- lsp:: DocumentDiagnosticReportResult :: Partial ( report ) => report . related_documents ,
273
+ lsp:: DocumentDiagnosticReportResult :: Partial ( _ ) => { }
280
274
} ;
281
-
282
- for ( url, report) in related_documents. into_iter ( ) . flatten ( ) {
283
- let result_id = match report {
284
- lsp:: DocumentDiagnosticReportKind :: Full ( report) => {
285
- let Ok ( uri) = Uri :: try_from ( & url) else {
286
- continue ;
287
- } ;
288
-
289
- editor. handle_lsp_diagnostics ( & provider, uri, None , report. items ) ;
290
- report. result_id
291
- }
292
- lsp:: DocumentDiagnosticReportKind :: Unchanged ( report) => Some ( report. result_id ) ,
293
- } ;
294
-
295
- if let Some ( doc) = editor. document_by_path_mut ( url. path ( ) ) {
296
- doc. previous_diagnostic_id = result_id;
297
- }
298
- }
299
275
}
0 commit comments